From 3261e73b0c9442a969c7f261c67e8ee4116e6df5 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 10 Mar 2017 12:30:27 +0100 Subject: [PATCH] Apply current filter to search results QHelpSearchIndexReaderDefault is run in a separate thread in order to return the results of the search. It reads the info about the current filter in order to filter out the results. However, the main thread didn't store the current filter in the qhc file, just in memory, and the search thread reads the value of the current filter from qhc file, so this goes out of sync. This patch stores the current filter in the qhc file whenever it is changed. The current code resets the current filter by the launch of creator anyway. Task-number: QTCREATORBUG-17845 Change-Id: I7c8d2c93b319c94e1400a677ecee9e9b41b029c3 Reviewed-by: Karsten Heimrich Reviewed-by: Eike Ziller --- src/plugins/coreplugin/helpmanager.cpp | 2 -- src/plugins/help/localhelpmanager.cpp | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/plugins/coreplugin/helpmanager.cpp b/src/plugins/coreplugin/helpmanager.cpp index f5d457fbf5a..376323b6019 100644 --- a/src/plugins/coreplugin/helpmanager.cpp +++ b/src/plugins/coreplugin/helpmanager.cpp @@ -380,8 +380,6 @@ void HelpManager::setupHelpManager() // create the help engine d->m_helpEngine = new QHelpEngineCore(collectionFilePath(), m_instance); - d->m_helpEngine->setAutoSaveFilter(false); - d->m_helpEngine->setCurrentFilter(tr("Unfiltered")); d->m_helpEngine->setupData(); foreach (const QString &filePath, d->documentationFromInstaller()) diff --git a/src/plugins/help/localhelpmanager.cpp b/src/plugins/help/localhelpmanager.cpp index 28ebd548e24..52892094928 100644 --- a/src/plugins/help/localhelpmanager.cpp +++ b/src/plugins/help/localhelpmanager.cpp @@ -304,10 +304,8 @@ QHelpEngine &LocalHelpManager::helpEngine() { if (!m_guiEngine) { QMutexLocker _(&m_guiMutex); - if (!m_guiEngine) { + if (!m_guiEngine) m_guiEngine = new QHelpEngine(QString()); - m_guiEngine->setAutoSaveFilter(false); - } } return *m_guiEngine; }