C++: changed the CppModelManager to use a normal singleton.

Also removed two TODOs.

Change-Id: I91b235795da7e87a21782d189844eacdd68c5f3c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Erik Verbruggen
2012-10-15 16:38:56 +02:00
parent 826a90ba13
commit b6608da7d1
4 changed files with 29 additions and 22 deletions

View File

@@ -80,7 +80,7 @@ class CPPTOOLS_EXPORT CppModelManager : public CPlusPlus::CppModelManagerInterfa
Q_OBJECT
public:
CppModelManager(QObject *parent);
CppModelManager(QObject *parent = 0);
virtual ~CppModelManager();
static CppModelManager *instance();
@@ -192,6 +192,10 @@ private:
CppPreprocessor *preproc,
QStringList files);
private:
static QMutex m_modelManagerMutex;
static CppModelManager *m_modelManagerInstance;
private:
CPlusPlus::Snapshot m_snapshot;