forked from qt-creator/qt-creator
TextEditor: remove unused function of syntax highlighter
Change-Id: I9debd22730fcf2c9423beaaa5666ce282ed0bbe0 Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
@@ -60,7 +60,6 @@ public:
|
||||
QList<QTextCharFormat> formats;
|
||||
QList<std::pair<int,TextStyle>> formatCategories;
|
||||
QTextCharFormat whitespaceFormat;
|
||||
bool noAutomaticHighlighting = false;
|
||||
QString mimeType;
|
||||
};
|
||||
|
||||
@@ -345,12 +344,11 @@ void SyntaxHighlighter::setDocument(QTextDocument *doc)
|
||||
d->doc = doc;
|
||||
documentChanged(oldDoc, d->doc);
|
||||
if (d->doc) {
|
||||
if (!d->noAutomaticHighlighting) {
|
||||
connect(d->doc, &QTextDocument::contentsChange, this, &SyntaxHighlighter::reformatBlocks);
|
||||
d->rehighlightPending = true;
|
||||
QMetaObject::invokeMethod(this, &SyntaxHighlighter::delayedRehighlight,
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
connect(d->doc, &QTextDocument::contentsChange, this, &SyntaxHighlighter::reformatBlocks);
|
||||
d->rehighlightPending = true;
|
||||
QMetaObject::invokeMethod(this,
|
||||
&SyntaxHighlighter::delayedRehighlight,
|
||||
Qt::QueuedConnection);
|
||||
d->foldValidator.setup(qobject_cast<TextDocumentLayout *>(doc->documentLayout()));
|
||||
}
|
||||
}
|
||||
@@ -846,15 +844,6 @@ FontSettings SyntaxHighlighter::fontSettings() const
|
||||
Q_D(const SyntaxHighlighter);
|
||||
return d->fontSettings;
|
||||
}
|
||||
/*!
|
||||
The syntax highlighter is not anymore reacting to the text document if \a noAutomatic is
|
||||
\c true.
|
||||
*/
|
||||
void SyntaxHighlighter::setNoAutomaticHighlighting(bool noAutomatic)
|
||||
{
|
||||
Q_D(SyntaxHighlighter);
|
||||
d->noAutomaticHighlighting = noAutomatic;
|
||||
}
|
||||
|
||||
/*!
|
||||
Creates text format categories for the text styles themselves, so the highlighter can
|
||||
|
@@ -53,8 +53,6 @@ public:
|
||||
virtual void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
||||
TextEditor::FontSettings fontSettings() const;
|
||||
|
||||
void setNoAutomaticHighlighting(bool noAutomatic);
|
||||
|
||||
enum State {
|
||||
InProgress,
|
||||
Done
|
||||
|
Reference in New Issue
Block a user