Skip to content

Commit 4a057c1

Browse files
authored
Set _q_readonly property for online-help (cppcheck-opensource#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
1 parent 818e157 commit 4a057c1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

gui/helpdialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ HelpDialog::HelpDialog(QWidget *parent) :
6666
}
6767

6868
mHelpEngine = new QHelpEngine(helpFile);
69+
// Disable the timestamp check of online-help.qhc by setting _q_readonly
70+
mHelpEngine->setProperty("_q_readonly", QVariant::fromValue<bool>(true));
6971
mHelpEngine->setupData();
7072

7173
mUi->contents->addWidget(mHelpEngine->contentWidget());

0 commit comments

Comments
 (0)