-rw-r--r-- | core/launcher/documentlist.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index fd385d6..35a5d56 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp @@ -107,33 +107,33 @@ public: /* * scandocs will be read from Config */ DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/, QObject *parent, const char *name ) : QObject( parent, name ) { appLnkSet = new AppLnkSet( MimeType::appsFolderName() ); d = new DocumentListPrivate( serverGui ); d->needToSendAllDocLinks = false; Config cfg( "Launcher" ); cfg.setGroup( "DocTab" ); d->scanDocs = cfg.readBoolEntry( "Enable", true ); odebug << "DocumentList::DocumentList() : scanDocs = " << d->scanDocs << "" << oendl; - QTimer::singleShot( 10, this, SLOT( startInitialScan() ) ); + QTimer::singleShot( 0, this, SLOT( startInitialScan() ) ); } void DocumentList::startInitialScan() { reloadAppLnks(); reloadDocLnks(); } DocumentList::~DocumentList() { delete appLnkSet; delete d; } void DocumentList::add( const DocLnk& doc ) @@ -174,33 +174,33 @@ void DocumentList::resend() emit allRemoved(); QTimer::singleShot( 5, this, SLOT( resendWorker() ) ); } void DocumentList::resendWorker() { const QList<DocLnk> &list = d->dls.children(); for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) add( *(*it) ); resume(); } */ void DocumentList::rescan() { - //odebug << "rescan" << oendl; + owarn << "XXXXXXXXXXX rescan" << oendl; pause(); d->initialize(); resume(); } void DocumentList::timerEvent( QTimerEvent *te ) { if ( te->timerId() == d->tid ) { // Do 3 at a time if ( d->serverGui ) d->serverGui->aboutToAddBegin(); for (int i = 0; i < 3; i++ ) { const DocLnk *lnk = d->iterate(); if ( lnk ) { add( *lnk ); @@ -688,33 +688,35 @@ const QString DocumentListPrivate::nextFile() QFileInfoList *fl = (QFileInfoList *)fil; unsigned int pos = listPositions[searchDepth]; if ( pos >= fl->count() ) { // go up a depth delete listDirs[searchDepth]; listDirs[searchDepth] = 0; lists[searchDepth] = 0; listPositions[searchDepth] = 0; searchDepth--; } else { const QFileInfo *fi = fl->at(pos); listPositions[searchDepth]++; QString bn = fi->fileName(); if ( bn[0] != '.' ) { if ( fi->isDir() ) { - if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" ) { + if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" + && bn != "proc" && bn != "dev" && bn != "bin" && bn != "usr" + && bn != "etc" && bn != "lib" && bn != "sbin" && bn != "tmp" && bn != "var") { // go down a depth QDir dir( fi->filePath() ); // odebug << "now going in to path: " << bn << "" << oendl; if ( !dir.exists( ".Qtopia-ignore" ) ) { if ( searchDepth < MAX_SEARCH_DEPTH - 1) { searchDepth++; listDirs[searchDepth] = new QDir( dir ); lists[searchDepth] = listDirs[searchDepth]->entryInfoList(); listPositions[searchDepth] = 0; } } } } else { estimatedPercentScanned(); return fl->at(pos)->filePath(); } |