summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2017-03-10 12:30:27 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2017-05-04 09:06:13 +0000
commit3261e73b0c9442a969c7f261c67e8ee4116e6df5 (patch)
tree0e3a2c69cbc0984673dc3880d4ef02104618a49b
parent3b901b25a86f49ebef9be03ec762ed76422fd91c (diff)
downloadqt-creator-3261e73b0c9442a969c7f261c67e8ee4116e6df5.tar.gz
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 <karsten.heimrich@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/coreplugin/helpmanager.cpp2
-rw-r--r--src/plugins/help/localhelpmanager.cpp4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/plugins/coreplugin/helpmanager.cpp b/src/plugins/coreplugin/helpmanager.cpp
index f5d457fbf5..376323b601 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 28ebd548e2..5289209492 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;
}