-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 30 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.h | 3 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector_p.h | 2 |
3 files changed, 12 insertions, 23 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index e8d502f..01a51a2 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp @@ -158,2 +158,8 @@ QString OFileViewInterface::startDirectory()const +bool OFileViewInterface::allItem( const QString& item )const +{ + return selector()->m_allList.contains( item ); +} + + ODocumentFileView::ODocumentFileView( OFileSelector* selector ) @@ -532,10 +538,2 @@ bool OFileViewFileListView::eventFilter (QObject *, QEvent *e) -/** - * @return true if the item show all files or directories - */ -bool OFileViewFileListView::allItem( const QString& item )const -{ - return m_sel->allItem( item ); -} - void OFileViewFileListView::connectSlots() @@ -827,3 +825,3 @@ void OFileViewFileSystem::activate( const QString& str ) { - m_all = m_view->allItem( str ); + m_all = allItem( str ); } @@ -877,3 +875,3 @@ OFileSelector::OFileSelector( QWidget* parent, int mode, int sel, - m_allList = new QStringList(); + m_allList = QStringList(); @@ -1035,3 +1033,3 @@ void OFileSelector::initViews() m_views.insert( QObject::tr("All Directories"), in ); - m_allList->append( QObject::tr("All Directories") ); + m_allList.append( QObject::tr("All Directories") ); } else { @@ -1040,3 +1038,3 @@ void OFileSelector::initViews() m_views.insert( QObject::tr("All Files"), in ); - m_allList->append( QObject::tr("All Files") ); + m_allList.append( QObject::tr("All Files") ); } @@ -1160,10 +1158,2 @@ int OFileSelector::selector()const -/** - * @return true if the item show all files or directories - */ -bool OFileSelector::allItem( const QString& item )const -{ - return ( m_allList->findIndex( item ) != -1 ); -} - QStringList OFileSelector::currentMimeType()const diff --git a/libopie2/opieui/fileselector/ofileselector.h b/libopie2/opieui/fileselector/ofileselector.h index d96712a..d166afd 100644 --- a/libopie2/opieui/fileselector/ofileselector.h +++ b/libopie2/opieui/fileselector/ofileselector.h @@ -123,3 +123,2 @@ public: int selector()const; - bool allItem( const QString& )const; @@ -215,3 +214,3 @@ private: - QStringList* m_allList; + QStringList m_allList; diff --git a/libopie2/opieui/fileselector/ofileselector_p.h b/libopie2/opieui/fileselector/ofileselector_p.h index 252a7f5..790d2bd 100644 --- a/libopie2/opieui/fileselector/ofileselector_p.h +++ b/libopie2/opieui/fileselector/ofileselector_p.h @@ -77,2 +77,3 @@ public: QString name()const; + bool allItem( const QString& )const; protected: @@ -154,3 +155,2 @@ public: QString currentDir()const; - bool allItem( const QString& )const; protected: |