aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontextplugin.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-05-14 12:36:03 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-15 14:37:42 +0200
commit80040425830483d9e228de8841e92bf020855d0a (patch)
tree1009cc382c0a9db4d20915542f5612a6a343ab31 /src/quick/scenegraph/qsgcontextplugin.cpp
parente1c26307c25173d4f44592dcd01d22eafda76f23 (diff)
Remove usage of deprecated plugin loader functionality.
Use QFactoryLoader::instance(int) instead if deprecated QFactoryLoader::instance(key). Change-Id: I61d087e7e03d472f69427e53f5f194856eb5bffe Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgcontextplugin.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontextplugin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp
index bd1c4cece8..dd5ad490b9 100644
--- a/src/quick/scenegraph/qsgcontextplugin.cpp
+++ b/src/quick/scenegraph/qsgcontextplugin.cpp
@@ -99,7 +99,9 @@ QSGAdaptionPluginData *contextFactory()
#if !defined (QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
if (!device.isEmpty()) {
- plugin->factory = qobject_cast<QSGContextFactoryInterface*>(loader()->instance(device));
+ const int index = loader()->indexOf(device);
+ if (index != -1)
+ plugin->factory = qobject_cast<QSGContextFactoryInterface*>(loader()->instance(index));
plugin->deviceName = device;
#ifndef QT_NO_DEBUG
if (!plugin->factory) {