author | zecke <zecke> | 2002-09-15 22:23:21 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-15 22:23:21 (UTC) |
commit | db5920256d8ee5e7276ac2bdd32c66b99dd88fa0 (patch) (side-by-side diff) | |
tree | 797d385c64595293d666d3e3fb61abad696dd612 | |
parent | aabe567e96d040c483b947f5758a1405cc312fdc (diff) | |
download | opie-db5920256d8ee5e7276ac2bdd32c66b99dd88fa0.zip opie-db5920256d8ee5e7276ac2bdd32c66b99dd88fa0.tar.gz opie-db5920256d8ee5e7276ac2bdd32c66b99dd88fa0.tar.bz2 |
remove bogus files
-rw-r--r-- | libopie/ofileselector/olister.cpp~ | 64 | ||||
-rw-r--r-- | libopie/ofileselector/olister.h~ | 57 | ||||
-rw-r--r-- | libopie/ofileselector/olister.o | bin | 24852 -> 0 bytes | |||
-rw-r--r-- | libopie/ofileselector/olocallister.cpp~ | 97 | ||||
-rw-r--r-- | libopie/ofileselector/olocallister.h~ | 14 | ||||
-rw-r--r-- | libopie/ofileselector/olocallister.o | bin | 42280 -> 0 bytes |
6 files changed, 0 insertions, 232 deletions
diff --git a/libopie/ofileselector/olister.cpp~ b/libopie/ofileselector/olister.cpp~ deleted file mode 100644 index 180422a..0000000 --- a/libopie/ofileselector/olister.cpp~ +++ b/dev/null @@ -1,64 +0,0 @@ -#include "olister.h" -#include "ofileview.h" -#include "ofileselector.h" - - -OLister::OLister( OFileSelector* view) - : m_view( view ) -{ -} -OLister::~OLister() { -} -void OLister::addFile( const QString& mine, - QFileInfo* info, - bool isSymlink ) { - view()->currentView()->addFile( mine, - info, - isSymlink ); -} -void OLister::addFile( const QString& mine, - const QString& path, - const QString& file, - bool isSymlink ) { - view()->currentView()->addFile( mine, - path, - file, - isSymlink ); -} -void OLister::addDir( const QString& mine, - QFileInfo* info, - bool isSymlink ) { - - view()->currentView()->addDir( mine, - info, - isSymlink ); -} -void OLister::addDir( const QString& mine, - const QString& path, - const QString& dir, - bool isSymlink ) { - view()->currentView()->addDir( mine, - path, - dir, - isSymlink ); -} -void OLister::addSymlink( const QString& mine, - QFileInfo* info, - bool isSymlink ) { - view()->currentView()->addSymlink( mine, - info, - isSymlink ); -} -void OLister::addSymlink( const QString& mine, - const QString& path, - const QString& name, - bool isSymlink ) { - view()->currentView()->addSymlink( mine, - path, - name, - isSymlink ); -} -OFileSelector* OLister::view() { - return m_view; -} - diff --git a/libopie/ofileselector/olister.h~ b/libopie/ofileselector/olister.h~ deleted file mode 100644 index bb6304c..0000000 --- a/libopie/ofileselector/olister.h~ +++ b/dev/null @@ -1,57 +0,0 @@ -#ifndef OPIE_FILE_LISTER_H -#define OPIE_FILE_LISTER_H - -#include <qfileinfo.h> -#include <qmap.h> -#include <qstring.h> - -class OFileSelector; -/** - * lister is something like KIO but very - * very basic and currently only for - * populating our views. - * This is a base class which needs to be implemented. - * @see OLocalLister for a filesystem based implementation - */ -class OLister { -public: - OLister( OFileSelector* ); - virtual ~OLister(); - virtual void reparse(const QString& path) = 0; - - /** - * return a list of available mimetypes - */ - virtual QMap<QString, QString> mimeTypes( const QString& dir ) = 0; - -protected: - - void addFile( const QString& mine, - QFileInfo*, - bool isSymlink = FALSE ); - void addFile( const QString& mine, - const QString& path, - const QString& file, - bool isSymlink = FALSE ); - void addDir( const QString& mine, - QFileInfo*, - bool isSymlink = FALSE ); - void addDir( const QString& mine, - const QString& path, - const QString& dir, - bool isSymlink = FALSE ); - void addSymlink( const QString& mine, - QFileInfo* info, - bool isSymlink = FALSE); - void addSymlink( const QString& mine, - const QString& path, - const QString& name, - bool isSymlink = FALSE ); - OFileSelector* view(); -private: - OFileSelector* m_view; - - -}; - -#endif diff --git a/libopie/ofileselector/olister.o b/libopie/ofileselector/olister.o Binary files differdeleted file mode 100644 index ca58d6c..0000000 --- a/libopie/ofileselector/olister.o +++ b/dev/null diff --git a/libopie/ofileselector/olocallister.cpp~ b/libopie/ofileselector/olocallister.cpp~ deleted file mode 100644 index b0e5410..0000000 --- a/libopie/ofileselector/olocallister.cpp~ +++ b/dev/null @@ -1,97 +0,0 @@ -#include <qdir.h> -#include <qfileinfo.h> -#include <qmap.h> - -#include <qpe/mimetype.h> - -#include "ofileselector.h" -#include "olocallister.h" - -OLocalLister::OLocalLister( OFileSelector* file ) - : OLister( file ) -{ -} -OLocalLister::~OLocalLister() { -} - -QMap<QString, QString> OLocalLister::mimeTypes( const QString& curDir ) { - QMap<QString, QString> mimes; - - // let's find possible mimetypes - QDir dir( curDir ); - dir.setFilter( QDir::Files | QDir::Readable ); - dir.setSorting( QDir::Size ); - - const QFileInfoList *list = dir.entryInfoList(); - QFileInfoListIterator it( *list ); - QFileInfo *fi; - - while( (fi=it.current() ) ) { - if( fi->extension() == QString::fromLatin1("desktop") ){ - ++it; - continue; - } - MimeType type( fi->absFilePath() ); - - if( !mimes.contains( type.id() ) ){ - mimes.insert( type.id(), type.id() ); - } - - ++it; - } - - return mimes; -} -void OLocalLister::reparse( const QString& path ) { - QString currentMimeType; - QDir dir( path ); - - dir.setSorting( view()->sorting() ); - dir.setFilter( view()->filter() ); - - // now go through all files - const QFileInfoList *list = dir.entryInfoList(); - QFileInfoListIterator it( *list ); - QFileInfo *fi; - - while( (fi=it.current() ) ){ - - if( fi->fileName() == QString::fromLatin1("..") || - fi->fileName() == QString::fromLatin1(".") ){ - ++it; - continue; - } - if( fi->isSymLink() ){ - QString file = fi->dirPath( true ) + "/" + fi->readLink(); - /* - * 5 tries to prevent dos attack - */ - for( int i = 0; i<=4; i++) { - QFileInfo info( file ); - if( !info.exists() ){ - addSymlink( currentMimeType, fi, TRUE ); - break; - }else if( info.isDir() ){ - addDir( currentMimeType, fi, - TRUE ); - break; - }else if( info.isFile() ){ - addFile( currentMimeType, fi, TRUE ); - break; - }else if( info.isSymLink() ){ - file = info.dirPath(true ) + "/" + info.readLink() ; - break; - }else if( i == 4){ - addSymlink( currentMimeType, fi ); - } - } - - }else if( fi->isDir() ){ - addDir( currentMimeType, fi ); - }else if( fi->isFile() ){ - addFile( currentMimeType, fi ); - } - ++it; - } // of while loop -} - diff --git a/libopie/ofileselector/olocallister.h~ b/libopie/ofileselector/olocallister.h~ deleted file mode 100644 index a284b6e..0000000 --- a/libopie/ofileselector/olocallister.h~ +++ b/dev/null @@ -1,14 +0,0 @@ -#ifndef OPIE_LOCAL_LISTER -#define OPIE_LOCAL_LISTER - -#include "olister.h" - -class OLocalLister : public OLister { -public: - OLocalLister( OFileSelector* ); - ~OLocalLister(); - void reparse( const QString& path ); - QMap<QString, QString> mimeTypes(const QString& dir ); -}; - -#endif diff --git a/libopie/ofileselector/olocallister.o b/libopie/ofileselector/olocallister.o Binary files differdeleted file mode 100644 index 1a4685d..0000000 --- a/libopie/ofileselector/olocallister.o +++ b/dev/null |