author | llornkcor <llornkcor> | 2004-10-08 10:22:20 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-10-08 10:22:20 (UTC) |
commit | 0e41f335c0db28250216a5292a2b7bcee2a1cf4a (patch) (unidiff) | |
tree | cac0c40b6e35117b199b45bf5674215ceeb9abd9 /core/launcher/documentlist.cpp | |
parent | b2e0fd018e1122f65dbbf8ab564e992988f35385 (diff) | |
download | opie-0e41f335c0db28250216a5292a2b7bcee2a1cf4a.zip opie-0e41f335c0db28250216a5292a2b7bcee2a1cf4a.tar.gz opie-0e41f335c0db28250216a5292a2b7bcee2a1cf4a.tar.bz2 |
this patch will add support for QD installing directly to opie device via sync. not functioning until QD 1.7.1 released. should compile for now
Diffstat (limited to 'core/launcher/documentlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/documentlist.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 44ceb0c..d8e7a83 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp | |||
@@ -387,10 +387,10 @@ void DocumentList::DiffAppLnks() | |||
387 | ++it1; | 387 | ++it1; |
388 | } | 388 | } |
389 | if (!found) { | 389 | if (!found) { |
390 | odebug << "Item " << j->name().ascii() << " needs to be added" << oendl; | 390 | odebug << "Item " << j->name().ascii() << " needs to be added" << oendl; |
391 | d->serverGui->applicationAdded( j->type(), *j ); | 391 | d->serverGui->applicationAdded( j->type(), *j ); |
392 | } | 392 | } |
393 | ++it2; | 393 | ++it2; |
394 | } | 394 | } |
395 | 395 | ||
396 | it1 = appLnkSet->children(); | 396 | it1 = appLnkSet->children(); |
@@ -403,13 +403,13 @@ void DocumentList::DiffAppLnks() | |||
403 | ++it2; | 403 | ++it2; |
404 | } | 404 | } |
405 | if (!found) { | 405 | if (!found) { |
406 | odebug << "Item " << i->name().ascii() << " needs to be removed" << oendl; | 406 | odebug << "Item " << i->name().ascii() << " needs to be removed" << oendl; |
407 | d->serverGui->applicationRemoved( i->type(), *i ); | 407 | d->serverGui->applicationRemoved( i->type(), *i ); |
408 | } | 408 | } |
409 | 409 | ||
410 | ++it1; | 410 | ++it1; |
411 | } | 411 | } |
412 | 412 | ||
413 | delete appLnkSet; | 413 | delete appLnkSet; |
414 | appLnkSet = appLnkSet2; | 414 | appLnkSet = appLnkSet2; |
415 | 415 | ||
@@ -422,10 +422,10 @@ void DocumentList::storageChanged() | |||
422 | t.start(); | 422 | t.start(); |
423 | DiffAppLnks(); | 423 | DiffAppLnks(); |
424 | // reloadAppLnks(); | 424 | // reloadAppLnks(); |
425 | odebug << "Reload App links took " << t.elapsed() << " ms" << oendl; | 425 | odebug << "Reload App links took " << t.elapsed() << " ms" << oendl; |
426 | reloadDocLnks(); | 426 | reloadDocLnks(); |
427 | // odebug << "Reload links took " << t.elapsed() << " ms " << oendl; | 427 | // odebug << "Reload links took " << t.elapsed() << " ms " << oendl; |
428 | odebug << "Reload All links took " << t.elapsed() << " ms" << oendl; | 428 | odebug << "Reload All links took " << t.elapsed() << " ms" << oendl; |
429 | // ### Optimization opportunity | 429 | // ### Optimization opportunity |
430 | // Could be a bit more intelligent and somehow work out which | 430 | // Could be a bit more intelligent and somehow work out which |
431 | // mtab entry has changed and then only scan that and add and remove | 431 | // mtab entry has changed and then only scan that and add and remove |
@@ -456,7 +456,18 @@ void DocumentList::sendAllDocLinks() | |||
456 | if ( f.open( IO_ReadOnly ) ) { | 456 | if ( f.open( IO_ReadOnly ) ) { |
457 | QTextStream ts( &f ); | 457 | QTextStream ts( &f ); |
458 | ts.setEncoding( QTextStream::UnicodeUTF8 ); | 458 | ts.setEncoding( QTextStream::UnicodeUTF8 ); |
459 | contents += ts.read(); | 459 | QString docLnk = ts.read(); |
460 | // Strip out the (stale) LinkFile entry | ||
461 | int start = docLnk.find( "\nLinkFile = " ) + 1; | ||
462 | if ( start > 0 ) { | ||
463 | int end = docLnk.find( "\n", start + 1 ) + 1; | ||
464 | contents += docLnk.left(start); | ||
465 | contents += docLnk.mid(end); | ||
466 | } else { | ||
467 | contents += docLnk; | ||
468 | } | ||
469 | contents += "LinkFile = " + doc->linkFile() + "\n"; | ||
470 | |||
460 | f.close(); | 471 | f.close(); |
461 | } else | 472 | } else |
462 | fake = TRUE; | 473 | fake = TRUE; |