Fix missing documentation when built with Qt 6

The default value for readOnly property of QHelpEngineCore
changed to true in Qt 6. We need to set it to false by hand.

Task-number: QTBUG-87783
Change-Id: I6b0d4f043797463b3437a6aef673eba8e1b9c3ad
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2020-11-02 17:41:01 +01:00
parent c3873fcf40
commit 0dcdb43ddb
2 changed files with 10 additions and 0 deletions

View File

@@ -170,6 +170,9 @@ void HelpManager::registerDocumentationNow(QFutureInterface<bool> &futureInterfa
futureInterface.setProgressValue(0);
QHelpEngineCore helpEngine(collectionFilePath());
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
helpEngine.setReadOnly(false);
#endif
helpEngine.setupData();
bool docsChanged = false;
QStringList nameSpaces = helpEngine.registeredDocumentations();
@@ -407,6 +410,9 @@ void HelpManager::setupHelpManager()
// create the help engine
d->m_helpEngine = new QHelpEngineCore(collectionFilePath(), m_instance);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
d->m_helpEngine->setReadOnly(false);
#endif
#ifdef HELP_NEW_FILTER_ENGINE
d->m_helpEngine->setUsesFilterEngine(true);
#endif