diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-28 01:00:39 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-01-28 14:17:01 +0000 |
commit | ef442327b8a4122fe46462e95a0537ec5ac53cb6 (patch) | |
tree | c0a0267ab4175d520a27c1dc7b589af220e77c48 /src/gui/text/qtextdocument.cpp | |
parent | 07a576cc6171fd78d7fb3a0332349c2fa6127460 (diff) | |
parent | 558fc903acc610769279da2737ad679aa9fd728d (diff) |
Merge "Merge remote-tracking branch 'origin/5.15' into dev"
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 2d7f2bb844..46cfc79643 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2234,7 +2234,7 @@ QVariant QTextDocument::loadResource(int type, const QUrl &name) } if (!r.isNull()) { - if (type == ImageResource && r.type() == QVariant::ByteArray) { + if (type == ImageResource && r.userType() == QMetaType::QByteArray) { if (qApp->thread() != QThread::currentThread()) { // must use images in non-GUI threads QImage image; @@ -3049,12 +3049,12 @@ QString QTextHtmlExporter::findUrlForImage(const QTextDocument *doc, qint64 cach for (; it != priv->cachedResources.constEnd(); ++it) { const QVariant &v = it.value(); - if (v.type() == QVariant::Image && !isPixmap) { + if (v.userType() == QMetaType::QImage && !isPixmap) { if (qvariant_cast<QImage>(v).cacheKey() == cacheKey) break; } - if (v.type() == QVariant::Pixmap && isPixmap) { + if (v.userType() == QMetaType::QPixmap && isPixmap) { if (qvariant_cast<QPixmap>(v).cacheKey() == cacheKey) break; } |