summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp8
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
@@ -111,25 +111,25 @@ DocumentList::DocumentList( ServerInterface *serverGui, bool /*scanDocs*/,
111 QObject *parent, const char *name ) 111 QObject *parent, const char *name )
112 : QObject( parent, name ) 112 : QObject( parent, name )
113{ 113{
114 appLnkSet = new AppLnkSet( MimeType::appsFolderName() ); 114 appLnkSet = new AppLnkSet( MimeType::appsFolderName() );
115 d = new DocumentListPrivate( serverGui ); 115 d = new DocumentListPrivate( serverGui );
116 d->needToSendAllDocLinks = false; 116 d->needToSendAllDocLinks = false;
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
126void DocumentList::startInitialScan() 126void DocumentList::startInitialScan()
127{ 127{
128 reloadAppLnks(); 128 reloadAppLnks();
129 reloadDocLnks(); 129 reloadDocLnks();
130} 130}
131 131
132DocumentList::~DocumentList() 132DocumentList::~DocumentList()
133{ 133{
134 delete appLnkSet; 134 delete appLnkSet;
135 delete d; 135 delete d;
@@ -178,25 +178,25 @@ void DocumentList::resend()
178 178
179void DocumentList::resendWorker() 179void DocumentList::resendWorker()
180{ 180{
181 const QList<DocLnk> &list = d->dls.children(); 181 const QList<DocLnk> &list = d->dls.children();
182 for ( QListIterator<DocLnk> it( list ); it.current(); ++it ) 182 for ( QListIterator<DocLnk> it( list ); it.current(); ++it )
183 add( *(*it) ); 183 add( *(*it) );
184 resume(); 184 resume();
185} 185}
186*/ 186*/
187 187
188void DocumentList::rescan() 188void 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
197void DocumentList::timerEvent( QTimerEvent *te ) 197void DocumentList::timerEvent( QTimerEvent *te )
198{ 198{
199 if ( te->timerId() == d->tid ) { 199 if ( te->timerId() == d->tid ) {
200 // Do 3 at a time 200 // Do 3 at a time
201 if ( d->serverGui ) 201 if ( d->serverGui )
202 d->serverGui->aboutToAddBegin(); 202 d->serverGui->aboutToAddBegin();
@@ -692,25 +692,27 @@ const QString DocumentListPrivate::nextFile()
692 // go up a depth 692 // go up a depth
693 delete listDirs[searchDepth]; 693 delete listDirs[searchDepth];
694 listDirs[searchDepth] = 0; 694 listDirs[searchDepth] = 0;
695 lists[searchDepth] = 0; 695 lists[searchDepth] = 0;
696 listPositions[searchDepth] = 0; 696 listPositions[searchDepth] = 0;
697 searchDepth--; 697 searchDepth--;
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++;
711 listDirs[searchDepth] = new QDir( dir ); 713 listDirs[searchDepth] = new QDir( dir );
712 lists[searchDepth] = listDirs[searchDepth]->entryInfoList(); 714 lists[searchDepth] = listDirs[searchDepth]->entryInfoList();
713 listPositions[searchDepth] = 0; 715 listPositions[searchDepth] = 0;
714 } 716 }
715 } 717 }
716 } 718 }