From 983c87dd6a431917ff0b3fe88240262898095c68 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 6 Oct 2014 11:26:58 +0200 Subject: 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 --- src/plugins/cpptools/cppmodelmanager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cppmodelmanager.cpp') 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(indexingSupport)) + d->m_indexingSupporter = 0; + else + d->m_indexingSupporter = indexingSupport; + } } CppIndexingSupport *CppModelManager::indexingSupport() -- cgit v1.2.1