diff options
-rw-r--r-- | src/location/maps/qgeoserviceprovider.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp index 3cb0f2df..2d8151ad 100644 --- a/src/location/maps/qgeoserviceprovider.cpp +++ b/src/location/maps/qgeoserviceprovider.cpp @@ -742,8 +742,11 @@ void QGeoServiceProviderPrivate::loadPlugin(const QVariantMap ¶meters) // load the actual plugin QObject *instance = loader()->instance(idx); - factory = qobject_cast<QGeoServiceProviderFactory *>(instance); factoryV2 = qobject_cast<QGeoServiceProviderFactoryV2 *>(instance); + if (!factoryV2) + factory = qobject_cast<QGeoServiceProviderFactory *>(instance); + else + factory = factoryV2; } QHash<QString, QJsonObject> QGeoServiceProviderPrivate::plugins(bool reload) |