CppTools: Let BaseEditorDocumentParser acquire the mutex

...so derived classes are freed from doing this.

Change-Id: I73f3eca54be14cfd6542a466f0e9c024457bef07
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-07-10 12:34:40 +02:00
parent 442bdbded2
commit 5902a62298
6 changed files with 18 additions and 18 deletions

View File

@@ -56,11 +56,10 @@ public:
virtual ~BaseEditorDocumentParser();
QString filePath() const;
Configuration configuration() const;
void setConfiguration(const Configuration &configuration);
virtual void update(WorkingCopy workingCopy) = 0;
void update(WorkingCopy workingCopy);
ProjectPart::Ptr projectPart() const;
@@ -69,7 +68,6 @@ protected:
QByteArray editorDefines;
ProjectPart::Ptr projectPart;
};
State state() const;
void setState(const State &state);
@@ -77,14 +75,15 @@ protected:
const Configuration &config,
const State &state);
mutable QMutex m_updateIsRunning;
mutable QMutex m_stateAndConfigurationMutex;
private:
const QString m_filePath;
virtual void updateHelper(WorkingCopy workingCopy) = 0;
const QString m_filePath;
Configuration m_configuration;
State m_state;
mutable QMutex m_updateIsRunning;
};
} // namespace CppTools