summaryrefslogtreecommitdiff
path: root/core/launcher/documentlist.cpp
authorllornkcor <llornkcor>2004-10-08 10:22:20 (UTC)
committer llornkcor <llornkcor>2004-10-08 10:22:20 (UTC)
commit0e41f335c0db28250216a5292a2b7bcee2a1cf4a (patch) (side-by-side diff)
treecac0c40b6e35117b199b45bf5674215ceeb9abd9 /core/launcher/documentlist.cpp
parentb2e0fd018e1122f65dbbf8ab564e992988f35385 (diff)
downloadopie-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.cpp31
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()
++it1;
}
if (!found) {
- odebug << "Item " << j->name().ascii() << " needs to be added" << oendl;
+ odebug << "Item " << j->name().ascii() << " needs to be added" << oendl;
d->serverGui->applicationAdded( j->type(), *j );
- }
- ++it2;
+ }
+ ++it2;
}
it1 = appLnkSet->children();
@@ -403,13 +403,13 @@ void DocumentList::DiffAppLnks()
++it2;
}
if (!found) {
- odebug << "Item " << i->name().ascii() << " needs to be removed" << oendl;
+ odebug << "Item " << i->name().ascii() << " needs to be removed" << oendl;
d->serverGui->applicationRemoved( i->type(), *i );
}
-
- ++it1;
+
+ ++it1;
}
-
+
delete appLnkSet;
appLnkSet = appLnkSet2;
@@ -422,10 +422,10 @@ void DocumentList::storageChanged()
t.start();
DiffAppLnks();
// reloadAppLnks();
- odebug << "Reload App links took " << t.elapsed() << " ms" << oendl;
+ odebug << "Reload App links took " << t.elapsed() << " ms" << oendl;
reloadDocLnks();
// odebug << "Reload links took " << t.elapsed() << " ms " << oendl;
- odebug << "Reload All links took " << t.elapsed() << " ms" << oendl;
+ odebug << "Reload All links took " << t.elapsed() << " ms" << oendl;
// ### Optimization opportunity
// Could be a bit more intelligent and somehow work out which
// mtab entry has changed and then only scan that and add and remove
@@ -456,7 +456,18 @@ void DocumentList::sendAllDocLinks()
if ( f.open( IO_ReadOnly ) ) {
QTextStream ts( &f );
ts.setEncoding( QTextStream::UnicodeUTF8 );
- contents += ts.read();
+ QString docLnk = ts.read();
+ // Strip out the (stale) LinkFile entry
+ int start = docLnk.find( "\nLinkFile = " ) + 1;
+ if ( start > 0 ) {
+ int end = docLnk.find( "\n", start + 1 ) + 1;
+ contents += docLnk.left(start);
+ contents += docLnk.mid(end);
+ } else {
+ contents += docLnk;
+ }
+ contents += "LinkFile = " + doc->linkFile() + "\n";
+
f.close();
} else
fake = TRUE;