From 80040425830483d9e228de8841e92bf020855d0a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 14 May 2012 12:36:03 +0200 Subject: [PATCH] Remove usage of deprecated plugin loader functionality. Use QFactoryLoader::instance(int) instead if deprecated QFactoryLoader::instance(key). Change-Id: I61d087e7e03d472f69427e53f5f194856eb5bffe Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/qsgcontextplugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index bd1c4ce..dd5ad49 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(loader()->instance(device)); + const int index = loader()->indexOf(device); + if (index != -1) + plugin->factory = qobject_cast(loader()->instance(index)); plugin->deviceName = device; #ifndef QT_NO_DEBUG if (!plugin->factory) { -- 2.7.4