summaryrefslogtreecommitdiff
path: root/core/launcher/documentlist.cpp
Side-by-side diff
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
@@ -389,6 +389,6 @@ void DocumentList::DiffAppLnks()
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;
}
@@ -405,9 +405,9 @@ void DocumentList::DiffAppLnks()
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;
@@ -424,6 +424,6 @@ void DocumentList::storageChanged()
// 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
@@ -458,3 +458,14 @@ void DocumentList::sendAllDocLinks()
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();