summaryrefslogtreecommitdiff
path: root/src/assistant/qcollectiongenerator
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2017-08-25 17:02:29 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2018-04-23 14:14:34 +0000
commit829f9dec6bff57e8b3f1afdc982778a9d573174f (patch)
tree908d7930a11e24b621074ace5b3509a63a61d4f6 /src/assistant/qcollectiongenerator
parent58bf8789242b0775d491c8969abae8f42f2bc32d (diff)
downloadqttools-829f9dec6bff57e8b3f1afdc982778a9d573174f.tar.gz
Store the copy of the index inside the help collection file
This avoids having to open all .qch files at startup, which is slow and can lead to contention on open file handles. This change is backward compatible. The old help lib won't use the new tables. The new help lib will generate the new tables on first run or regenerate them when it detects they are not anymore in sync. Store also the timestamp info about the qch files and compare it upon every startup. If it doesn't match then new tables' data is regenerated. The case when running new Creator, then running old Creator and reconfiguring doc set and then running new Creator again should work properly. Task-number: QTCREATORBUG-18242 Change-Id: I7f656935ae2383b866b27e256eec23dab588efc5 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/assistant/qcollectiongenerator')
-rw-r--r--src/assistant/qcollectiongenerator/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/assistant/qcollectiongenerator/main.cpp b/src/assistant/qcollectiongenerator/main.cpp
index 57aaac0f0..a2968ecd0 100644
--- a/src/assistant/qcollectiongenerator/main.cpp
+++ b/src/assistant/qcollectiongenerator/main.cpp
@@ -476,14 +476,15 @@ int main(int argc, char *argv[])
return -1;
}
}
- if (!config.filesToRegister().isEmpty())
+ if (!config.filesToRegister().isEmpty()) {
if (Q_UNLIKELY(qEnvironmentVariableIsSet("SOURCE_DATE_EPOCH"))) {
QDateTime dt;
dt.setSecsSinceEpoch(qEnvironmentVariableIntValue("SOURCE_DATE_EPOCH"));
CollectionConfiguration::updateLastRegisterTime(helpEngine, dt);
- }
- else
+ } else {
CollectionConfiguration::updateLastRegisterTime(helpEngine);
+ }
+ }
if (!config.title().isEmpty())
CollectionConfiguration::setWindowTitle(helpEngine, config.title());