forked from qt-creator/qt-creator
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:
@@ -170,6 +170,9 @@ void HelpManager::registerDocumentationNow(QFutureInterface<bool> &futureInterfa
|
|||||||
futureInterface.setProgressValue(0);
|
futureInterface.setProgressValue(0);
|
||||||
|
|
||||||
QHelpEngineCore helpEngine(collectionFilePath());
|
QHelpEngineCore helpEngine(collectionFilePath());
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
helpEngine.setReadOnly(false);
|
||||||
|
#endif
|
||||||
helpEngine.setupData();
|
helpEngine.setupData();
|
||||||
bool docsChanged = false;
|
bool docsChanged = false;
|
||||||
QStringList nameSpaces = helpEngine.registeredDocumentations();
|
QStringList nameSpaces = helpEngine.registeredDocumentations();
|
||||||
@@ -407,6 +410,9 @@ void HelpManager::setupHelpManager()
|
|||||||
|
|
||||||
// create the help engine
|
// create the help engine
|
||||||
d->m_helpEngine = new QHelpEngineCore(collectionFilePath(), m_instance);
|
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
|
#ifdef HELP_NEW_FILTER_ENGINE
|
||||||
d->m_helpEngine->setUsesFilterEngine(true);
|
d->m_helpEngine->setUsesFilterEngine(true);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -411,6 +411,10 @@ QHelpEngine &LocalHelpManager::helpEngine()
|
|||||||
QMutexLocker _(&m_guiMutex);
|
QMutexLocker _(&m_guiMutex);
|
||||||
if (!m_guiEngine) {
|
if (!m_guiEngine) {
|
||||||
m_guiEngine = new QHelpEngine(QString());
|
m_guiEngine = new QHelpEngine(QString());
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
m_guiEngine->setReadOnly(false);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HELP_NEW_FILTER_ENGINE
|
#ifdef HELP_NEW_FILTER_ENGINE
|
||||||
m_guiEngine->setUsesFilterEngine(true);
|
m_guiEngine->setUsesFilterEngine(true);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user