forked from qt-creator/qt-creator
CppTools: Fix race conditions in CppEditorSupport
...when accessing m_lastSemanticInfo by introducing semanticInfo() and setSemanticInfo(), which lock the appropriate mutex. Task-number: QTCREATORBUG-11367 Change-Id: If8ac6b8e6d576dfd1869c98a7ff7952ec97f530e Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
enum ForceReason {
|
||||
NoForce,
|
||||
ForceDueToMissingSemanticInfo,
|
||||
ForceDueToInvalidSemanticInfo,
|
||||
ForceDueEditorRequest
|
||||
};
|
||||
|
||||
@@ -192,11 +192,16 @@ private:
|
||||
};
|
||||
|
||||
SemanticInfo::Source currentSource(bool force);
|
||||
void recalculateSemanticInfoNow(const SemanticInfo::Source &source, bool emitSignalWhenFinished,
|
||||
FuturizedTopLevelDeclarationProcessor *processor = 0);
|
||||
SemanticInfo recalculateSemanticInfoNow(const SemanticInfo::Source &source,
|
||||
bool emitSignalWhenFinished,
|
||||
FuturizedTopLevelDeclarationProcessor *processor = 0);
|
||||
void recalculateSemanticInfoDetached_helper(QFutureInterface<void> &future,
|
||||
SemanticInfo::Source source);
|
||||
|
||||
bool isSemanticInfoValid() const;
|
||||
SemanticInfo semanticInfo() const;
|
||||
void setSemanticInfo(const SemanticInfo &semanticInfo, bool emitSignal = true);
|
||||
|
||||
QSharedPointer<SnapshotUpdater> snapshotUpdater_internal() const;
|
||||
void setSnapshotUpdater_internal(const QSharedPointer<SnapshotUpdater> &updater);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user