author | zecke <zecke> | 2002-04-12 13:07:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-12 13:07:35 (UTC) |
commit | 3973cf42c778055ab81a9ee254eaf8829464f936 (patch) (side-by-side diff) | |
tree | 4ae4fc512c9e37657ea9f4e05f28d1ea57a855d3 /libopie/ofileselector.cc | |
parent | c1c9ac64f7f4871642d645ac1da1a2f36853ccb2 (diff) | |
download | opie-3973cf42c778055ab81a9ee254eaf8829464f936.zip opie-3973cf42c778055ab81a9ee254eaf8829464f936.tar.gz opie-3973cf42c778055ab81a9ee254eaf8829464f936.tar.bz2 |
Add OFileDialog to the .pro
OFileDialog is now working resize it when not used by the static
methods
OFileSelector some bugfixes. Some bugs are not yet fixed (the switching from
views can segfault )
-rw-r--r-- | libopie/ofileselector.cc | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index c3a3514..7451c1b 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -79,7 +79,7 @@ namespace { OFileSelector::OFileSelector(QWidget *wid, int mode, int selector, const QString &dirName, const QString &fileName, const QStringList &mimetypes ) : QWidget( wid ) { - + if(wid!=0) resize(wid->width(),wid->height()); m_selector = selector; m_currentDir = dirName; @@ -194,6 +194,7 @@ void OFileSelector::init() m_lay->addWidget(m_stack ); m_stack->raiseWidget(NORMAL ); connect(m_select, SIGNAL(fileSelected( const DocLnk &) ), this, SLOT(slotFileBridgeSelected(const DocLnk &) ) ); + m_pseudoLayout = 0l; }else { initializeListView(); } @@ -595,6 +596,7 @@ void OFileSelector::slotViewCheck(const QString &view ){ delete m_location; delete m_up; delete m_pseudo; + if(m_pseudoLayout!=0 ) delete m_pseudoLayout; } m_View = 0; @@ -624,20 +626,7 @@ void OFileSelector::slotViewCheck(const QString &view ){ delete m_View; m_View = 0; - delete m_boxToolbar; - delete m_homeButton; - delete m_docButton; - delete m_location; - delete m_up; - delete m_pseudo; - delete m_pseudoLayout; - m_boxToolbar = 0; - m_homeButton = 0; - m_docButton = 0; - m_location = 0; - m_up = 0; - m_pseudo = 0; - m_pseudoLayout = 0; + m_selector = EXTENDED; // create the ListView or IconView @@ -650,20 +639,6 @@ void OFileSelector::slotViewCheck(const QString &view ){ m_select = 0; delete m_View; m_View = 0; - delete m_boxToolbar; - delete m_homeButton; - delete m_docButton; - delete m_location; - delete m_up; - delete m_pseudo; - delete m_pseudoLayout; - m_boxToolbar = 0; - m_homeButton = 0; - m_docButton = 0; - m_location = 0; - m_up = 0; - m_pseudo = 0; - m_pseudoLayout = 0; m_selector = EXTENDED_ALL; initializeListView(); @@ -701,6 +676,7 @@ void OFileSelector::initializeListView() delete m_location; delete m_up; delete m_pseudo; + if(m_pseudoLayout!=0 ) // why did you overload malloc delete m_pseudoLayout; m_boxToolbar = 0; m_homeButton = 0; |