summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-28 01:00:39 +0100
committerLiang Qi <liang.qi@qt.io>2020-01-28 14:17:01 +0000
commitef442327b8a4122fe46462e95a0537ec5ac53cb6 (patch)
treec0a0267ab4175d520a27c1dc7b589af220e77c48 /src/gui/text/qtextdocument.cpp
parent07a576cc6171fd78d7fb3a0332349c2fa6127460 (diff)
parent558fc903acc610769279da2737ad679aa9fd728d (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.cpp6
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;
}