forked from qt-creator/qt-creator
SyntaxHighlighter: Add signal that highlighting is finished
Added function syntaxInfoUpdated shows whether highlighting inProgress or Done and signal highlightingFinished. Change-Id: I4cf2b5cfa97d73c882e69ee1df81497ec50a81f7 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -50,6 +50,10 @@ public:
|
||||
QTextDocument *document() const { return m_document; }
|
||||
SyntaxHighLighterCreator creator() const { return m_creator; }
|
||||
|
||||
bool syntaxInfoUpdated() const { return m_syntaxInfoUpdated == SyntaxHighlighter::State::Done; }
|
||||
signals:
|
||||
void highlightingFinished();
|
||||
|
||||
protected:
|
||||
std::unique_ptr<SyntaxHighlighterRunnerPrivate> d;
|
||||
QPointer<QTextDocument> m_document = nullptr;
|
||||
@@ -60,6 +64,8 @@ protected:
|
||||
const QString textAdded,
|
||||
const QMap<int, BlockPreeditData> &blocksPreedit);
|
||||
|
||||
SyntaxHighlighter::State m_syntaxInfoUpdated = SyntaxHighlighter::State::Done;
|
||||
|
||||
private:
|
||||
SyntaxHighLighterCreator m_creator;
|
||||
QString m_definitionName;
|
||||
|
||||
Reference in New Issue
Block a user