cppmodelmanagerinterface: use singleton instead of object pool

This commit is contained in:
hjk
2011-01-04 18:50:18 +01:00
parent 9d72c55347
commit d6a459c332
6 changed files with 13 additions and 29 deletions

View File

@@ -96,7 +96,7 @@ CMakeProject::~CMakeProject()
{
// Remove CodeModel support
CPlusPlus::CppModelManagerInterface *modelManager
= ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
= CPlusPlus::CppModelManagerInterface::instance();
QMap<QString, CMakeUiCodeModelSupport *>::const_iterator it, end;
it = m_uiCodeModelSupport.constBegin();
end = m_uiCodeModelSupport.constEnd();
@@ -283,7 +283,7 @@ bool CMakeProject::parseCMakeLists()
allIncludePaths.append(cbpparser.includeFiles());
CPlusPlus::CppModelManagerInterface *modelmanager =
ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
CPlusPlus::CppModelManagerInterface::instance();
if (modelmanager) {
CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
if (pinfo.includePaths != allIncludePaths
@@ -609,7 +609,7 @@ void CMakeProject::createUiCodeModelSupport()
{
// qDebug()<<"creatUiCodeModelSupport()";
CPlusPlus::CppModelManagerInterface *modelManager
= ExtensionSystem::PluginManager::instance()->getObject<CPlusPlus::CppModelManagerInterface>();
= CPlusPlus::CppModelManagerInterface::instance();
// First move all to
QMap<QString, CMakeUiCodeModelSupport *> oldCodeModelSupport;