summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-01-08 13:35:08 +0100
committerLaurent Montel <[email protected]>2018-01-08 13:35:08 +0100
commit77f6c3a6e8d3a6ee178f9ab9f73981311bfea12d (patch)
tree4d65e5eaba1056cf997dd1c39e807f76446dc44b
parent0ad61a53734a965e096a4c02c71d90597cbdf83a (diff)
Port to new connect api
-rw-r--r--src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp b/src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp
index 309e010..29606be 100644
--- a/src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp
+++ b/src/texteditor/plaintexteditor/plaintextsyntaxspellcheckinghighlighter.cpp
@@ -144,7 +144,11 @@ void PlainTextSyntaxSpellCheckingHighlighter::highlightBlock(const QString &text
const auto nextBlock = currentBlock().next();
if (nextBlock.isValid()) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+ QMetaObject::invokeMethod(this, [this, nextBlock] { rehighlightBlock(nextBlock); }, Qt::QueuedConnection);
+#else
QMetaObject::invokeMethod(this, "rehighlightBlock", Qt::QueuedConnection, Q_ARG(QTextBlock, nextBlock));
+#endif
}
}