summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qsyntaxhighlighter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qsyntaxhighlighter.cpp')
-rw-r--r--src/gui/text/qsyntaxhighlighter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp
index cf584f6980..b50957d63d 100644
--- a/src/gui/text/qsyntaxhighlighter.cpp
+++ b/src/gui/text/qsyntaxhighlighter.cpp
@@ -299,7 +299,7 @@ QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent)
: QObject(*new QSyntaxHighlighterPrivate, parent)
{
if (parent && parent->inherits("QTextEdit")) {
- QTextDocument *doc = parent->property("document").value<QTextDocument *>();
+ QTextDocument *doc = qvariant_cast<QTextDocument *>(parent->property("document"));
if (doc)
setDocument(doc);
}
@@ -321,7 +321,7 @@ QSyntaxHighlighter::QSyntaxHighlighter(QTextDocument *parent)
*/
QSyntaxHighlighter::~QSyntaxHighlighter()
{
- setDocument(0);
+ setDocument(nullptr);
}
/*!
@@ -601,7 +601,7 @@ QTextBlockUserData *QSyntaxHighlighter::currentBlockUserData() const
{
Q_D(const QSyntaxHighlighter);
if (!d->currentBlock.isValid())
- return 0;
+ return nullptr;
return d->currentBlock.userData();
}