From: Friedemann Kleint Date: Mon, 14 May 2012 10:36:03 +0000 (+0200) Subject: Remove usage of deprecated plugin loader functionality. X-Git-Tag: 071012131707~392 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80040425830483d9e228de8841e92bf020855d0a;p=profile%2Fivi%2Fqtdeclarative.git Remove usage of deprecated plugin loader functionality. Use QFactoryLoader::instance(int) instead if deprecated QFactoryLoader::instance(key). Change-Id: I61d087e7e03d472f69427e53f5f194856eb5bffe Reviewed-by: Gunnar Sletta --- 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) {