Diffstat (limited to 'noncore/graphics/opie-eye/iface/dirlister.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/iface/dirlister.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/iface/dirlister.cpp b/noncore/graphics/opie-eye/iface/dirlister.cpp index 7cf4361..e0ae63b 100644 --- a/noncore/graphics/opie-eye/iface/dirlister.cpp +++ b/noncore/graphics/opie-eye/iface/dirlister.cpp @@ -1,4 +1,5 @@ #include "dirlister.h" +#include <qdir.h> PDirLister::PDirLister( const char* name ) @@ -8,2 +9,14 @@ PDirLister::PDirLister( const char* name ) PDirLister::~PDirLister() {} + +/** + * Change dir one level up. The default implementation + * is to use QDir to change the dir. + * If you've a flat filesystem return \par path immediately. + */ +QString PDirLister::dirUp( const QString& path )const { + QDir dir( path ); + dir.cdUp(); + + return dir.absPath(); +} |