forked from qt-creator/qt-creator
CppEditor: Avoid premature calls to recalculateSemanticInfoNow
Now recalculateSemanticInfoNow is called only once instead of three times when a new editor is opened/created. Change-Id: Ife84fc9ca90cdbf2a417123e6a2b9e1e068dfdc4 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -98,12 +98,17 @@ public:
|
||||
void setExtraDiagnostics(const QString &key,
|
||||
const QList<CPlusPlus::Document::DiagnosticMessage> &messages);
|
||||
|
||||
/// True after the document was parsed/updated for the first time
|
||||
/// and the first semantic info calculation was started.
|
||||
bool initialized();
|
||||
|
||||
/// Retrieve the semantic info, which will get recalculated on the current
|
||||
/// thread if it is outdate.
|
||||
SemanticInfo recalculateSemanticInfo(bool emitSignalWhenFinished = true);
|
||||
|
||||
/// Recalculates the semantic info in a future, and will emit the semanticInfoUpdated() signal
|
||||
/// when finished.
|
||||
/// Recalculates the semantic info in a future, and will emit the
|
||||
/// semanticInfoUpdated() signal when finished.
|
||||
/// Requires that initialized() is true.
|
||||
/// \param force do not check if the old semantic info is still valid
|
||||
void recalculateSemanticInfoDetached(bool force = false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user