aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2019-06-20 15:40:49 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2019-06-25 08:06:28 +0200
commitc8827b444c23656f67feee2e3ebd4f2868ab3db7 (patch)
tree3394b91e7042c6332eb075a64fe9f6e9a4acd853 /src/qml/qml/qqmlengine.cpp
parent1404009264e3526838c608269a45d9acf61f5e46 (diff)
QQmlEngine: keep ImageProvider alive while in use
Fixes: QTBUG-76527 Change-Id: I4044ae833eff61a3f06c2366597c1623b26794b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index b94f449a39..5e06ff283e 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1169,6 +1169,12 @@ void QQmlEnginePrivate::registerFinalizeCallback(QObject *obj, int index)
}
}
+QSharedPointer<QQmlImageProviderBase> QQmlEnginePrivate::imageProvider(const QString &providerId) const
+{
+ QMutexLocker locker(&mutex);
+ return imageProviders.value(providerId.toLower());
+}
+
#if QT_CONFIG(qml_network)
/*!
Sets the \a factory to use for creating QNetworkAccessManager(s).