summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanager.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2014-10-06 11:26:58 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-10-06 15:28:00 +0200
commit983c87dd6a431917ff0b3fe88240262898095c68 (patch)
treed5c09803dc08c395f6dc5754cf8691214e0bdb71 /src/plugins/cpptools/cppmodelmanager.cpp
parent721b0f7033b41e4867f6e68f04490cf0d6912475 (diff)
downloadqt-creator-983c87dd6a431917ff0b3fe88240262898095c68.tar.gz
CppTools: Handle reset case for setIndexingSupport
For the time being, this function actually sets an additional CppIndexSupport to be executed. Handle the case that a client tries to restore the previous CppIndexingSupport (see SymbolSearcherTestCase). This fixes GenericProjectManager::test_simple in interaction with CppTools::test_builtinsymbolsearcher. Now first running the CppTools tests and then the GenericProjectManager tests work fine. Change-Id: Ibe7248ec8651d4fdc312f10cdcc9c56d6dd086d9 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanager.cpp')
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index a808cd5de3..8f21704398 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -995,8 +995,12 @@ BaseEditorDocumentProcessor *CppModelManager::editorDocumentProcessor(
void CppModelManager::setIndexingSupport(CppIndexingSupport *indexingSupport)
{
- if (indexingSupport)
- d->m_indexingSupporter = indexingSupport;
+ if (indexingSupport) {
+ if (dynamic_cast<BuiltinIndexingSupport *>(indexingSupport))
+ d->m_indexingSupporter = 0;
+ else
+ d->m_indexingSupporter = indexingSupport;
+ }
}
CppIndexingSupport *CppModelManager::indexingSupport()