summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanagerinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanagerinterface.cpp')
-rw-r--r--src/plugins/cpptools/cppmodelmanagerinterface.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/plugins/cpptools/cppmodelmanagerinterface.cpp b/src/plugins/cpptools/cppmodelmanagerinterface.cpp
index e755783bef..0f65f16225 100644
--- a/src/plugins/cpptools/cppmodelmanagerinterface.cpp
+++ b/src/plugins/cpptools/cppmodelmanagerinterface.cpp
@@ -164,8 +164,6 @@ void ProjectPart::evaluateToolchain(const ToolChain *tc,
toolchainDefines = tc->predefinedMacros(cxxflags);
}
-static CppModelManagerInterface *g_instance = 0;
-
const QString CppModelManagerInterface::configurationFileName()
{ return CPlusPlus::Preprocessor::configurationFileName; }
@@ -175,21 +173,15 @@ const QString CppModelManagerInterface::editorConfigurationFileName()
}
CppModelManagerInterface::CppModelManagerInterface(QObject *parent)
- : QObject(parent)
-{
- Q_ASSERT(!g_instance);
- g_instance = this;
-}
+ : CPlusPlus::CppModelManagerBase(parent)
+{ }
CppModelManagerInterface::~CppModelManagerInterface()
-{
- Q_ASSERT(g_instance == this);
- g_instance = 0;
-}
+{ }
CppModelManagerInterface *CppModelManagerInterface::instance()
{
- return g_instance;
+ return qobject_cast<CppModelManagerInterface *>(CPlusPlus::CppModelManagerBase::instance());
}
void CppModelManagerInterface::ProjectInfo::clearProjectParts()