author | zecke <zecke> | 2002-04-12 13:24:38 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-12 13:24:38 (UTC) |
commit | e3443eef4d49c7e91369790c29dd3b15b5dba854 (patch) (unidiff) | |
tree | b92f78798a247ecf3eec501c64f5f8c81dc043fe | |
parent | 3973cf42c778055ab81a9ee254eaf8829464f936 (diff) | |
download | opie-e3443eef4d49c7e91369790c29dd3b15b5dba854.zip opie-e3443eef4d49c7e91369790c29dd3b15b5dba854.tar.gz opie-e3443eef4d49c7e91369790c29dd3b15b5dba854.tar.bz2 |
fix the crash
-rw-r--r-- | libopie/TODO | 1 | ||||
-rw-r--r-- | libopie/ofileselector.cc | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libopie/TODO b/libopie/TODO index a4e1ada..d49910c 100644 --- a/libopie/TODO +++ b/libopie/TODO | |||
@@ -1,19 +1,20 @@ | |||
1 | - xmltree done | 1 | - xmltree done |
2 | 2 | ||
3 | - tododb | 3 | - tododb |
4 | - set Alarms | 4 | - set Alarms |
5 | - multiple categories | 5 | - multiple categories |
6 | - Attendees | 6 | - Attendees |
7 | 7 | ||
8 | - OFileSelector | 8 | - OFileSelector |
9 | - fix the weird view change bug delete m_pseudoLayout crash | ||
9 | - DocLnk when not in Document Mode ( and vice versa ) | 10 | - DocLnk when not in Document Mode ( and vice versa ) |
10 | - MultipleDocuments | 11 | - MultipleDocuments |
11 | - TreeView have a own OFileSelectorItem for this | 12 | - TreeView have a own OFileSelectorItem for this |
12 | - IconView add a QIconView to the widgetstack | 13 | - IconView add a QIconView to the widgetstack |
13 | - Move OFileSelectorItem to it's own files | 14 | - Move OFileSelectorItem to it's own files |
14 | - add functions to access the member variables | 15 | - add functions to access the member variables |
15 | - debug | 16 | - debug |
16 | - new Dirs created inside the listview | 17 | - new Dirs created inside the listview |
17 | 18 | ||
18 | - Clickable labels? | 19 | - Clickable labels? |
19 | Harlekin you wanted them in the libs? \ No newline at end of file | 20 | Harlekin you wanted them in the libs? \ No newline at end of file |
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 7451c1b..968541a 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc | |||
@@ -587,26 +587,26 @@ void OFileSelector::slotViewCheck(const QString &view ){ | |||
587 | QString currMime = m_mimeCheck->currentText(); | 587 | QString currMime = m_mimeCheck->currentText(); |
588 | if( view == QString::fromLatin1("Documents") ){ | 588 | if( view == QString::fromLatin1("Documents") ){ |
589 | // get the mimetype now | 589 | // get the mimetype now |
590 | // check if we're the current widget and return | 590 | // check if we're the current widget and return |
591 | if( m_View != 0) { // delete 0 shouldn't crash but it did :( | 591 | if( m_View != 0) { // delete 0 shouldn't crash but it did :( |
592 | delete m_View; | 592 | delete m_View; |
593 | delete m_boxToolbar; | 593 | delete m_boxToolbar; |
594 | delete m_homeButton; | 594 | delete m_homeButton; |
595 | delete m_docButton; | 595 | delete m_docButton; |
596 | delete m_location; | 596 | delete m_location; |
597 | delete m_up; | 597 | delete m_up; |
598 | delete m_pseudo; | 598 | delete m_pseudo; |
599 | if(m_pseudoLayout!=0 ) | 599 | //if(m_pseudoLayout!=0 ) |
600 | delete m_pseudoLayout; | 600 | //delete m_pseudoLayout; |
601 | } | 601 | } |
602 | m_View = 0; | 602 | m_View = 0; |
603 | m_boxToolbar = 0; | 603 | m_boxToolbar = 0; |
604 | m_homeButton = 0; | 604 | m_homeButton = 0; |
605 | m_docButton = 0; | 605 | m_docButton = 0; |
606 | m_location = 0; | 606 | m_location = 0; |
607 | m_up = 0; | 607 | m_up = 0; |
608 | m_pseudo = 0; | 608 | m_pseudo = 0; |
609 | m_pseudoLayout = 0; | 609 | m_pseudoLayout = 0; |
610 | 610 | ||
611 | delete m_select; | 611 | delete m_select; |
612 | m_select = new FileSelector( currMime == "All" ? QString::null : currMime, | 612 | m_select = new FileSelector( currMime == "All" ? QString::null : currMime, |
@@ -666,27 +666,27 @@ void OFileSelector::updateMimes() // lets check which mode is active | |||
666 | } | 666 | } |
667 | }; | 667 | }; |
668 | void OFileSelector::initializeListView() | 668 | void OFileSelector::initializeListView() |
669 | { | 669 | { |
670 | // just to make sure but clean it up better FIXME | 670 | // just to make sure but clean it up better FIXME |
671 | delete m_View; | 671 | delete m_View; |
672 | m_View = 0; | 672 | m_View = 0; |
673 | delete m_boxToolbar; | 673 | delete m_boxToolbar; |
674 | delete m_homeButton; | 674 | delete m_homeButton; |
675 | delete m_docButton; | 675 | delete m_docButton; |
676 | delete m_location; | 676 | delete m_location; |
677 | delete m_up; | 677 | delete m_up; |
678 | delete m_pseudo; | 678 | //delete m_pseudo; |
679 | if(m_pseudoLayout!=0 ) // why did you overload malloc | 679 | //if(m_pseudoLayout!=0 ) // why did you overload malloc |
680 | delete m_pseudoLayout; | 680 | //delete m_pseudoLayout; |
681 | m_boxToolbar = 0; | 681 | m_boxToolbar = 0; |
682 | m_homeButton = 0; | 682 | m_homeButton = 0; |
683 | m_docButton = 0; | 683 | m_docButton = 0; |
684 | m_location = 0; | 684 | m_location = 0; |
685 | m_up = 0; | 685 | m_up = 0; |
686 | m_pseudo = 0; | 686 | m_pseudo = 0; |
687 | m_pseudoLayout = 0; | 687 | m_pseudoLayout = 0; |
688 | // time for the toolbar | 688 | // time for the toolbar |
689 | m_pseudo = new QWidget(m_stack, "Pseudo Widget"); | 689 | m_pseudo = new QWidget(m_stack, "Pseudo Widget"); |
690 | m_pseudoLayout = new QVBoxLayout(m_pseudo ); | 690 | m_pseudoLayout = new QVBoxLayout(m_pseudo ); |
691 | if(m_shTool ){ | 691 | if(m_shTool ){ |
692 | m_boxToolbar = new QHBoxLayout( ); | 692 | m_boxToolbar = new QHBoxLayout( ); |