-rw-r--r-- | core/launcher/documentlist.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 033dd10..7f9366e 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp | |||
@@ -16,17 +16,18 @@ | |||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "documentlist.h" | 20 | #include "documentlist.h" |
21 | #include "serverinterface.h" | 21 | #include "serverinterface.h" |
22 | #include "launcherglobal.h" | ||
22 | 23 | ||
23 | #include <qtopia/mimetype.h> | 24 | #include <qtopia/mimetype.h> |
24 | #include <qtopia/resource.h> | 25 | #include <qtopia/resource.h> |
25 | #include <qtopia/global.h> | 26 | #include <qtopia/global.h> |
26 | #include <qtopia/categories.h> | 27 | #include <qtopia/private/categories.h> |
27 | #include <qtopia/qpeapplication.h> | 28 | #include <qtopia/qpeapplication.h> |
28 | #include <qtopia/applnk.h> | 29 | #include <qtopia/applnk.h> |
29 | #include <qtopia/storage.h> | 30 | #include <qtopia/storage.h> |
30 | #ifdef Q_WS_QWS | 31 | #ifdef Q_WS_QWS |
31 | #include <qtopia/qcopenvelope_qws.h> | 32 | #include <qtopia/qcopenvelope_qws.h> |
32 | #endif | 33 | #endif |
@@ -239,13 +240,13 @@ void DocumentList::reloadAppLnks() | |||
239 | while ( (l=itapp.current()) ) { | 240 | while ( (l=itapp.current()) ) { |
240 | ++itapp; | 241 | ++itapp; |
241 | if ( d->sendAppLnks && d->serverGui ) | 242 | if ( d->sendAppLnks && d->serverGui ) |
242 | d->serverGui->applicationAdded( l->type(), *l ); | 243 | d->serverGui->applicationAdded( l->type(), *l ); |
243 | } | 244 | } |
244 | 245 | ||
245 | if ( d->sendAppLnks && d->serverGui ) | 246 | if ( d->sendAppLnks && d->serverGui ) |
246 | d->serverGui->applicationScanningProgress( 100 ); | 247 | d->serverGui->applicationScanningProgress( 100 ); |
247 | } | 248 | } |
248 | 249 | ||
249 | void DocumentList::reloadDocLnks() | 250 | void DocumentList::reloadDocLnks() |
250 | { | 251 | { |
251 | if ( !d->scanDocs ) | 252 | if ( !d->scanDocs ) |
@@ -260,22 +261,22 @@ void DocumentList::reloadDocLnks() | |||
260 | } | 261 | } |
261 | 262 | ||
262 | void DocumentList::linkChanged( QString arg ) | 263 | void DocumentList::linkChanged( QString arg ) |
263 | { | 264 | { |
264 | //qDebug( "linkchanged( %s )", arg.latin1() ); | 265 | //qDebug( "linkchanged( %s )", arg.latin1() ); |
265 | 266 | ||
266 | if ( arg.isNull() || Global::isAppLnkFileName( arg ) ) { | 267 | if ( arg.isNull() || Opie::Global::isAppLnkFileName( arg ) ) { |
267 | reloadAppLnks(); | 268 | reloadAppLnks(); |
268 | } else { | 269 | } else { |
269 | 270 | ||
270 | const QList<DocLnk> &list = d->dls.children(); | 271 | const QList<DocLnk> &list = d->dls.children(); |
271 | QListIterator<DocLnk> it( list ); | 272 | QListIterator<DocLnk> it( list ); |
272 | while ( it.current() ) { | 273 | while ( it.current() ) { |
273 | DocLnk *doc = it.current(); | 274 | DocLnk *doc = it.current(); |
274 | ++it; | 275 | ++it; |
275 | if ( ( doc->linkFileKnown() && doc->linkFile() == arg ) | 276 | if ( ( doc->linkFileKnown() && doc->linkFile() == arg ) |
276 | || ( doc->fileKnown() && doc->file() == arg ) ) { | 277 | || ( doc->fileKnown() && doc->file() == arg ) ) { |
277 | //qDebug( "found old link" ); | 278 | //qDebug( "found old link" ); |
278 | DocLnk* dl = new DocLnk( arg ); | 279 | DocLnk* dl = new DocLnk( arg ); |
279 | // add new one if it exists and matches the mimetype | 280 | // add new one if it exists and matches the mimetype |
280 | if ( d->store( dl ) ) { | 281 | if ( d->store( dl ) ) { |
281 | // Existing link has been changed, send old link ref and a ref | 282 | // Existing link has been changed, send old link ref and a ref |
@@ -453,14 +454,14 @@ void DocumentListPrivate::initialize() | |||
453 | dit = 0; | 454 | dit = 0; |
454 | } | 455 | } |
455 | 456 | ||
456 | 457 | ||
457 | DocumentListPrivate::~DocumentListPrivate() | 458 | DocumentListPrivate::~DocumentListPrivate() |
458 | { | 459 | { |
459 | for ( int i = 0; i < MAX_SEARCH_DEPTH; i++ ) | 460 | for ( int i = 0; i < MAX_SEARCH_DEPTH; i++ ) |
460 | if ( listDirs[i] ) | 461 | if ( listDirs[i] ) |
461 | delete listDirs[i]; | 462 | delete listDirs[i]; |
462 | delete dit; | 463 | delete dit; |
463 | } | 464 | } |
464 | 465 | ||
465 | 466 | ||
466 | void DocumentListPrivate::estimatedPercentScanned() | 467 | void DocumentListPrivate::estimatedPercentScanned() |
@@ -619,13 +620,13 @@ const DocLnk *DocumentListPrivate::iterate() | |||
619 | QFileInfo fi( dit->currentKey() ); | 620 | QFileInfo fi( dit->currentKey() ); |
620 | dl->setFile( fi.filePath() ); | 621 | dl->setFile( fi.filePath() ); |
621 | dl->setName( fi.baseName() ); | 622 | dl->setName( fi.baseName() ); |
622 | if ( store(dl) ) { | 623 | if ( store(dl) ) { |
623 | ++*dit; | 624 | ++*dit; |
624 | iterationI++; | 625 | iterationI++; |
625 | if ( serverGui ) | 626 | if ( serverGui ) |
626 | serverGui->documentScanningProgress( 75 + (25*iterationI)/iterationCount ); | 627 | serverGui->documentScanningProgress( 75 + (25*iterationI)/iterationCount ); |
627 | return dl; | 628 | return dl; |
628 | } | 629 | } |
629 | } | 630 | } |
630 | iterationI++; | 631 | iterationI++; |
631 | } | 632 | } |