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>
This commit is contained in:
Nikolai Kosjar
2014-10-06 11:26:58 +02:00
parent 721b0f7033
commit 983c87dd6a

View File

@@ -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()