CppEditor: Allow force highlighting if using clang

...so we can rehighlight if it's requested by the editor. This is e.g.
necessary if the font size changes.

Task-number: QTCREATORBUG-11502
Change-Id: I608921899fc37fcf1394db9ff041e6b378196bdd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-03-11 14:00:57 -03:00
parent 18e6be55d7
commit cbf98ba819
3 changed files with 22 additions and 11 deletions

View File

@@ -119,11 +119,17 @@ public:
CPlusPlus::Document::Ptr lastSemanticInfoDocument() const;
enum ForceReason {
NoForce,
ForceDueToMissingSemanticInfo,
ForceDueEditorRequest
};
/// 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);
/// \param forceReason the reason to force, if any
void recalculateSemanticInfoDetached(ForceReason forceReason);
CppCompletionAssistProvider *completionAssistProvider() const;
@@ -148,7 +154,7 @@ private slots:
void updateDocumentNow();
void onDocumentUpdated(CPlusPlus::Document::Ptr doc);
void startHighlighting();
void startHighlighting(ForceReason forceReason = NoForce);
void onDiagnosticsChanged();