summaryrefslogtreecommitdiff
path: root/libopie2
authorar <ar>2004-09-17 22:30:48 (UTC)
committer ar <ar>2004-09-17 22:30:48 (UTC)
commit081f8a3c3a6c6d45743f451cd9dc966a135b8156 (patch) (side-by-side diff)
tree69fc48dd6a07c4510d46118e92bc72796247de67 /libopie2
parent8f14f56495dbef9dc760869da872513527cd7f91 (diff)
downloadopie-081f8a3c3a6c6d45743f451cd9dc966a135b8156.zip
opie-081f8a3c3a6c6d45743f451cd9dc966a135b8156.tar.gz
opie-081f8a3c3a6c6d45743f451cd9dc966a135b8156.tar.bz2
- cleanup allItem handling
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/fileselector/ofileselector.cpp30
-rw-r--r--libopie2/opieui/fileselector/ofileselector.h3
-rw-r--r--libopie2/opieui/fileselector/ofileselector_p.h2
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: