author | llornkcor <llornkcor> | 2005-08-14 01:56:52 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-08-14 01:56:52 (UTC) |
commit | 11644efb6f433c5def0341b8d086804ce457d5a5 (patch) (unidiff) | |
tree | 5432a575837e77f3238aac8bdcc397586c45a21f | |
parent | 6ee18e3d11d5204ca6c8e885bc563ab34befdaec (diff) | |
download | opie-11644efb6f433c5def0341b8d086804ce457d5a5.zip opie-11644efb6f433c5def0341b8d086804ce457d5a5.tar.gz opie-11644efb6f433c5def0341b8d086804ce457d5a5.tar.bz2 |
make assumption that Documents files will never be installed/written to /proc /dev /bin and similar places.. so we don't need to waste time scanning these.
-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 | |||
@@ -117,13 +117,13 @@ DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/, | |||
117 | 117 | ||
118 | Config cfg( "Launcher" ); | 118 | Config cfg( "Launcher" ); |
119 | cfg.setGroup( "DocTab" ); | 119 | cfg.setGroup( "DocTab" ); |
120 | d->scanDocs = cfg.readBoolEntry( "Enable", true ); | 120 | d->scanDocs = cfg.readBoolEntry( "Enable", true ); |
121 | odebug << "DocumentList::DocumentList() : scanDocs = " << d->scanDocs << "" << oendl; | 121 | odebug << "DocumentList::DocumentList() : scanDocs = " << d->scanDocs << "" << oendl; |
122 | 122 | ||
123 | QTimer::singleShot( 10, this, SLOT( startInitialScan() ) ); | 123 | QTimer::singleShot( 0, this, SLOT( startInitialScan() ) ); |
124 | } | 124 | } |
125 | 125 | ||
126 | void DocumentList::startInitialScan() | 126 | void DocumentList::startInitialScan() |
127 | { | 127 | { |
128 | reloadAppLnks(); | 128 | reloadAppLnks(); |
129 | reloadDocLnks(); | 129 | reloadDocLnks(); |
@@ -184,13 +184,13 @@ void DocumentList::resendWorker() | |||
184 | resume(); | 184 | resume(); |
185 | } | 185 | } |
186 | */ | 186 | */ |
187 | 187 | ||
188 | void DocumentList::rescan() | 188 | void DocumentList::rescan() |
189 | { | 189 | { |
190 | //odebug << "rescan" << oendl; | 190 | owarn << "XXXXXXXXXXX rescan" << oendl; |
191 | pause(); | 191 | pause(); |
192 | d->initialize(); | 192 | d->initialize(); |
193 | resume(); | 193 | resume(); |
194 | } | 194 | } |
195 | 195 | ||
196 | 196 | ||
@@ -698,13 +698,15 @@ const QString DocumentListPrivate::nextFile() | |||
698 | } else { | 698 | } else { |
699 | const QFileInfo *fi = fl->at(pos); | 699 | const QFileInfo *fi = fl->at(pos); |
700 | listPositions[searchDepth]++; | 700 | listPositions[searchDepth]++; |
701 | QString bn = fi->fileName(); | 701 | QString bn = fi->fileName(); |
702 | if ( bn[0] != '.' ) { | 702 | if ( bn[0] != '.' ) { |
703 | if ( fi->isDir() ) { | 703 | if ( fi->isDir() ) { |
704 | if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" ) { | 704 | if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" |
705 | && bn != "proc" && bn != "dev" && bn != "bin" && bn != "usr" | ||
706 | && bn != "etc" && bn != "lib" && bn != "sbin" && bn != "tmp" && bn != "var") { | ||
705 | // go down a depth | 707 | // go down a depth |
706 | QDir dir( fi->filePath() ); | 708 | QDir dir( fi->filePath() ); |
707 | // odebug << "now going in to path: " << bn << "" << oendl; | 709 | // odebug << "now going in to path: " << bn << "" << oendl; |
708 | if ( !dir.exists( ".Qtopia-ignore" ) ) { | 710 | if ( !dir.exists( ".Qtopia-ignore" ) ) { |
709 | if ( searchDepth < MAX_SEARCH_DEPTH - 1) { | 711 | if ( searchDepth < MAX_SEARCH_DEPTH - 1) { |
710 | searchDepth++; | 712 | searchDepth++; |