From b26a17f30dea7e4ac78a31983176681a7a5d07d3 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 15 Sep 2014 00:12:27 +0200 Subject: CppTools: Change CppModelManager implementation pattern Replace the CppModelManagerInterface/derived CppModelManager combo by a more common CppModelManager/CppModelManagerPrivate pimpl pattern. Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287 Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/cpptoolstestcase.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/plugins/cpptools/cpptoolstestcase.cpp') diff --git a/src/plugins/cpptools/cpptoolstestcase.cpp b/src/plugins/cpptools/cpptoolstestcase.cpp index c91451d179..d76ee4818e 100644 --- a/src/plugins/cpptools/cpptoolstestcase.cpp +++ b/src/plugins/cpptools/cpptoolstestcase.cpp @@ -39,9 +39,9 @@ static bool closeEditorsWithoutGarbageCollectorInvocation(const QList &editors) { - CppTools::CppModelManagerInterface::instance()->enableGarbageCollector(false); + CppTools::CppModelManager::instance()->enableGarbageCollector(false); const bool closeEditorsSucceeded = Core::EditorManager::closeEditors(editors, false); - CppTools::CppModelManagerInterface::instance()->enableGarbageCollector(true); + CppTools::CppModelManager::instance()->enableGarbageCollector(true); return closeEditorsSucceeded; } @@ -79,7 +79,7 @@ bool TestDocument::writeToDisk() const } TestCase::TestCase(bool runGarbageCollector) - : m_modelManager(CppModelManagerInterface::instance()) + : m_modelManager(CppModelManager::instance()) , m_succeededSoFar(false) , m_runGarbageCollector(runGarbageCollector) { @@ -116,18 +116,18 @@ bool TestCase::openBaseTextEditor(const QString &fileName, TextEditor::BaseTextE CPlusPlus::Snapshot TestCase::globalSnapshot() { - return CppModelManagerInterface::instance()->snapshot(); + return CppModelManager::instance()->snapshot(); } bool TestCase::garbageCollectGlobalSnapshot() { - CppModelManagerInterface::instance()->GC(); + CppModelManager::instance()->GC(); return globalSnapshot().isEmpty(); } bool TestCase::parseFiles(const QSet &filePaths) { - CppModelManagerInterface::instance()->updateSourceFiles(filePaths).waitForFinished(); + CppModelManager::instance()->updateSourceFiles(filePaths).waitForFinished(); QCoreApplication::processEvents(); const CPlusPlus::Snapshot snapshot = globalSnapshot(); if (snapshot.isEmpty()) { -- cgit v1.2.1