summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2009-11-06 10:49:07 (GMT)
committerck <qt-info@nokia.com>2009-11-06 10:49:07 (GMT)
commitc059c6f2add4a500121c19b0c95d0c57196285ba (patch)
tree6b8ac3818e1809007843a44c69352f0b37a14394 /tools/assistant
parenta34b73f0c4f86cf1c333a31c25f9c05460bca173 (diff)
downloadQt-c059c6f2add4a500121c19b0c95d0c57196285ba.zip
Qt-c059c6f2add4a500121c19b0c95d0c57196285ba.tar.gz
Qt-c059c6f2add4a500121c19b0c95d0c57196285ba.tar.bz2
Assistant: Fix bugs on cached collection file handling.
1. When the dates between the caller-supplied and the cached versions of a collection file differed, we used to overwrite the cached with the original version. This was obviously wrong - we should only overwrite when the cached version is older. 2. We also forgot to set the zoom factor when overwriting. Task-number: QTBUG-4899 Reviewed-by: kh1
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/tools/assistant/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index a721880..12bc5b1 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -115,7 +115,7 @@ updateUserCollection(QHelpEngineCore& user, const QHelpEngineCore& caller)
const uint userCollectionCreationTime = user.
customValue(QLatin1String("CreationTime"), 1).toUInt();
- if (callerCollectionCreationTime == userCollectionCreationTime)
+ if (callerCollectionCreationTime <= userCollectionCreationTime)
return false;
user.setCustomValue(QLatin1String("CreationTime"),
@@ -124,6 +124,12 @@ updateUserCollection(QHelpEngineCore& user, const QHelpEngineCore& caller)
caller.customValue(QLatin1String("WindowTitle")));
user.setCustomValue(QLatin1String("LastShownPages"),
caller.customValue(QLatin1String("LastShownPages")));
+#if !defined(QT_NO_WEBKIT)
+ const QLatin1String zoomKey("LastPagesZoomWebView");
+#else
+ const QLatin1String zoomKey("LastPagesZoomTextBrowser");
+#endif
+ user.setCustomValue(zoomKey, caller.customValue(zoomKey));
user.setCustomValue(QLatin1String("CurrentFilter"),
caller.customValue(QLatin1String("CurrentFilter")));
user.setCustomValue(QLatin1String("CacheDirectory"),