Set _q_readonly property for online-help (#2890)

- Setting _q_readonly disables the timestamp check of the registered
  online-help.qch file
- This enables displaying of Contents and Index of the online help,
  even if the timestamp of online-help.qch is slightly different.
  Differences in the timestamp can result from packing online-help.qch
  in a cab file, when building the installer (1 or 2 seconds) or from
  installing the file under a different timezone under Linux etc.
- Remark: Qt 5.14 or newer is required to display Contents or Index,
  when the help files are readonly
This commit is contained in:
Wolfgang Stöggl 2020-11-08 15:06:14 +01:00 committed by GitHub
parent 818e1574ad
commit 4a057c1813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,8 @@ HelpDialog::HelpDialog(QWidget *parent) :
} }
mHelpEngine = new QHelpEngine(helpFile); mHelpEngine = new QHelpEngine(helpFile);
// Disable the timestamp check of online-help.qhc by setting _q_readonly
mHelpEngine->setProperty("_q_readonly", QVariant::fromValue<bool>(true));
mHelpEngine->setupData(); mHelpEngine->setupData();
mUi->contents->addWidget(mHelpEngine->contentWidget()); mUi->contents->addWidget(mHelpEngine->contentWidget());