diff options
18 files changed, 94 insertions, 242 deletions
diff --git a/src/location/location.pro b/src/location/location.pro index b71264a3..78b3277e 100644 --- a/src/location/location.pro +++ b/src/location/location.pro @@ -6,7 +6,7 @@ QPRO_PWD = $$PWD CONFIG += module MODULE_PRI = ../../modules/qt_location.pri -QT = core gui network +QT = core core-private gui network DEFINES += QT_BUILD_LOCATION_LIB QT_MAKEDLL @@ -36,7 +36,6 @@ PUBLIC_HEADERS += \ qnmeapositioninfosource.h \ qgeopositioninfosourcefactory.h \ qlatin1constant.h \ - qmobilitypluginsearch.h \ qtlocation.h \ qlocationglobal.h diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp index 062e7d9b..cba0110d 100644 --- a/src/location/maps/qgeoserviceprovider.cpp +++ b/src/location/maps/qgeoserviceprovider.cpp @@ -64,11 +64,15 @@ #include <QObject> #include <QProcess> #include <QEventLoop> - -#include "qmobilitypluginsearch.h" +#include <QtCore/private/qfactoryloader_p.h> QT_BEGIN_NAMESPACE +#ifndef QT_NO_LIBRARY +Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, + (QT_GEOSERVICE_BACKEND_INTERFACE, QLatin1String("/geoservices"))) +#endif + /*! \class QGeoServiceProvider \inmodule QtLocation @@ -95,7 +99,7 @@ QT_BEGIN_NAMESPACE Subclasses of QGeoServiceProvider guarantee that the different services that they provide are interoperable. - At this point only the Nokia Services plugin is pacakged with Qt Mobility, + At this point only the Nokia Services plugin is packaged with Qt, which is accessible using the provider name "nokia". */ @@ -456,17 +460,13 @@ QHash<QString, QGeoServiceProviderFactory*> QGeoServiceProviderPrivate::plugins( void QGeoServiceProviderPrivate::loadDynamicPlugins(QHash<QString, QGeoServiceProviderFactory*> *plugins) { - QStringList paths; - paths << mobilityPlugins(QLatin1String("geoservices")); - - QPluginLoader qpl; - for (int i = 0; i < paths.count(); ++i) { - qpl.setFileName(paths.at(i)); - - QGeoServiceProviderFactory *f = qobject_cast<QGeoServiceProviderFactory*>(qpl.instance()); + QFactoryLoader *l = loader(); + QString key; + for (int i = 0; i < l->keys().count(); i++) { + key = l->keys().at(i); + QGeoServiceProviderFactory *f = qobject_cast<QGeoServiceProviderFactory*>(l->instance(key)); if (f) { - QString name = f->providerName(); - + const QString name = f->providerName(); #if !defined QT_NO_DEBUG const bool showDebug = qgetenv("QT_DEBUG_PLUGINS").toInt() > 0; if (showDebug) diff --git a/src/location/maps/qgeoserviceproviderfactory.h b/src/location/maps/qgeoserviceproviderfactory.h index 4b26b950..21300135 100644 --- a/src/location/maps/qgeoserviceproviderfactory.h +++ b/src/location/maps/qgeoserviceproviderfactory.h @@ -47,6 +47,7 @@ #include <QtPlugin> #include <QMap> #include <QString> +#include <QFactoryInterface> QT_BEGIN_HEADER @@ -54,7 +55,7 @@ QT_BEGIN_NAMESPACE -class Q_LOCATION_EXPORT QGeoServiceProviderFactory +class Q_LOCATION_EXPORT QGeoServiceProviderFactory : public QFactoryInterface { public: virtual ~QGeoServiceProviderFactory() {} @@ -76,7 +77,7 @@ public: QString *errorString) const; }; -#define QT_GEOSERVICE_BACKEND_INTERFACE "com.nokia.qt.mobility.geoservice.serviceproviderfactory/1.0" +#define QT_GEOSERVICE_BACKEND_INTERFACE "com.nokia.qt.geoservice.serviceproviderfactory/1.0" Q_DECLARE_INTERFACE(QGeoServiceProviderFactory, QT_GEOSERVICE_BACKEND_INTERFACE); QT_END_NAMESPACE diff --git a/src/location/qgeoareamonitor.cpp b/src/location/qgeoareamonitor.cpp index ca603933..def302ed 100644 --- a/src/location/qgeoareamonitor.cpp +++ b/src/location/qgeoareamonitor.cpp @@ -177,18 +177,10 @@ qreal QGeoAreaMonitor::radius() const */ QGeoAreaMonitor *QGeoAreaMonitor::createDefaultMonitor(QObject *parent) { - // Native Symbian area monitor is temporarily disabled, - // see http://bugreports.qt.nokia.com/browse/QTMOBILITY-1059 -//#if defined(Q_OS_SYMBIAN) && defined(QT_LOCATION_S60_MONITORING) -// QGeoAreaMonitor *ret = NULL; -// TRAPD(error, ret = QGeoAreaMonitorS60::NewL(parent)); -// return ret; -//#else QGeoAreaMonitorPolling *ret = NULL; ret = new QGeoAreaMonitorPolling(parent); if (ret && ret->isValid()) return ret; -//#endif return 0; } diff --git a/src/location/qgeopositioninfosource.cpp b/src/location/qgeopositioninfosource.cpp index aa5ab282..ceeb4265 100644 --- a/src/location/qgeopositioninfosource.cpp +++ b/src/location/qgeopositioninfosource.cpp @@ -41,11 +41,12 @@ #include <qgeopositioninfosource.h> #include "qgeopositioninfosourcefactory.h" +#include <QFile> #include <QPluginLoader> #include <QStringList> #include <QSettings> #include <QCryptographicHash> -#include "qmobilitypluginsearch.h" +#include <QtCore/private/qfactoryloader_p.h> #if defined(Q_OS_SYMBIAN) # include "qgeopositioninfosource_s60_p.h" @@ -70,6 +71,11 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_LIBRARY +Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, + (QT_POSITION_SOURCE_INTERFACE, QLatin1String("/position"))) +#endif + /*! \class QGeoPositionInfoSource \inmodule QtLocation @@ -166,9 +172,6 @@ QList<QGeoPositionInfoSourceFactory*> QGeoPositionInfoSourcePrivate::pluginsSort void QGeoPositionInfoSourcePrivate::loadDynamicPlugins(QHash<QString, QGeoPositionInfoSourceFactory *> &plugins) { - QStringList paths; - paths << mobilityPlugins(QLatin1String("position")); - QPluginLoader qpl; QString blockName; @@ -222,26 +225,28 @@ void QGeoPositionInfoSourcePrivate::loadDynamicPlugins(QHash<QString, QGeoPositi } // still set blockName to ensure the plugin doesn't load - blockName = parts.at(1); + blockName = parts.at(0); } else { qWarning("Position plugin whitelist: invalid format -- should be key,filename,hash,size"); } } - for (int i = 0; i < paths.count(); ++i) { - if (paths.at(i) != blockName) { - qpl.setFileName(paths.at(i)); - - QGeoPositionInfoSourceFactory *f = - qobject_cast<QGeoPositionInfoSourceFactory*>(qpl.instance()); - if (f) { - QString name = f->sourceName(); - - #if !defined QT_NO_DEBUG + QFactoryLoader *l = loader(); + QString key; + for (int i = 0; i < l->keys().count(); i++) { + key = l->keys().at(i); + QGeoPositionInfoSourceFactory *f = + qobject_cast<QGeoPositionInfoSourceFactory*>(l->instance(key)); + if (f) { + const QString name = f->sourceName(); + if (name == blockName) { + delete f; + } else { +#if !defined QT_NO_DEBUG const bool showDebug = qgetenv("QT_DEBUG_PLUGINS").toInt() > 0; if (showDebug) qDebug("Dynamic: found a service provider plugin with name %s", qPrintable(name)); - #endif +#endif plugins.insertMulti(name, f); } } diff --git a/src/location/qgeopositioninfosourcefactory.h b/src/location/qgeopositioninfosourcefactory.h index 15839f9a..79000078 100644 --- a/src/location/qgeopositioninfosourcefactory.h +++ b/src/location/qgeopositioninfosourcefactory.h @@ -45,6 +45,7 @@ #include "qgeopositioninfosource.h" #include "qgeosatelliteinfosource.h" #include <QList> +#include <QFactoryInterface> QT_BEGIN_HEADER @@ -52,7 +53,7 @@ QT_BEGIN_NAMESPACE -class Q_LOCATION_EXPORT QGeoPositionInfoSourceFactory +class Q_LOCATION_EXPORT QGeoPositionInfoSourceFactory : public QFactoryInterface { public: virtual ~QGeoPositionInfoSourceFactory(); @@ -65,7 +66,7 @@ public: virtual QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent) = 0; }; -#define QT_POSITION_SOURCE_INTERFACE "com.nokia.qt.mobility.position.sourcefactory/1.0" +#define QT_POSITION_SOURCE_INTERFACE "com.nokia.qt.position.sourcefactory/1.0" Q_DECLARE_INTERFACE(QGeoPositionInfoSourceFactory, QT_POSITION_SOURCE_INTERFACE); QT_END_NAMESPACE diff --git a/src/location/qgeosatelliteinfosource.cpp b/src/location/qgeosatelliteinfosource.cpp index ea8d4824..69a72a1f 100644 --- a/src/location/qgeosatelliteinfosource.cpp +++ b/src/location/qgeosatelliteinfosource.cpp @@ -44,7 +44,8 @@ #include <QStringList> #include <QCryptographicHash> #include <QSettings> -#include "qmobilitypluginsearch.h" +#include <QtCore/private/qfactoryloader_p.h> +#include <QFile> #if defined(Q_OS_SYMBIAN) # include "qgeosatelliteinfosource_s60_p.h" @@ -69,6 +70,11 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_LIBRARY +Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, + (QT_POSITION_SOURCE_INTERFACE, QLatin1String("/position"))) +#endif + class QGeoSatelliteInfoSourcePrivate { public: @@ -108,9 +114,6 @@ QList<QGeoPositionInfoSourceFactory*> QGeoSatelliteInfoSourcePrivate::pluginsSor void QGeoSatelliteInfoSourcePrivate::loadDynamicPlugins(QHash<QString, QGeoPositionInfoSourceFactory *> &plugins) { - QStringList paths; - paths << mobilityPlugins(QLatin1String("position")); - QPluginLoader qpl; QString blockName; @@ -170,20 +173,22 @@ void QGeoSatelliteInfoSourcePrivate::loadDynamicPlugins(QHash<QString, QGeoPosit } } - for (int i = 0; i < paths.count(); ++i) { - if (paths.at(i) != blockName) { - qpl.setFileName(paths.at(i)); - - QGeoPositionInfoSourceFactory *f = - qobject_cast<QGeoPositionInfoSourceFactory*>(qpl.instance()); - if (f) { - QString name = f->sourceName(); - - #if !defined QT_NO_DEBUG + QFactoryLoader* l = loader(); + QString key; + for (int i = 0; i < l->keys().count(); ++i) { + key = l->keys().at(i); + QGeoPositionInfoSourceFactory *f = + qobject_cast<QGeoPositionInfoSourceFactory*>(l->instance(key)); + if (f) { + const QString name = f->sourceName(); + if (name == blockName) { + delete f; + } else { +#if !defined QT_NO_DEBUG const bool showDebug = qgetenv("QT_DEBUG_PLUGINS").toInt() > 0; if (showDebug) qDebug("Dynamic: found a service provider plugin with name %s", qPrintable(name)); - #endif +#endif plugins.insertMulti(name, f); } } diff --git a/src/location/qmobilitypluginsearch.h b/src/location/qmobilitypluginsearch.h deleted file mode 100644 index 5f0464d6..00000000 --- a/src/location/qmobilitypluginsearch.h +++ /dev/null @@ -1,178 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtLocation module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef QMOBILITYPLUGINSEARCH_H -#define QMOBILITYPLUGINSEARCH_H - -#include <QCoreApplication> -#include <QStringList> -#include <QDir> -#include <QDebug> - -#if defined(Q_OS_SYMBIAN) -# include <f32file.h> -#endif - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - - - -#if defined(Q_OS_SYMBIAN) -static inline bool qSymbian_CheckDir(const QDir& dir, RFs& rfs) -{ - bool pathFound = false; - // In Symbian, going cdUp() in a c:/private/<uid3>/ will result in *platsec* error at fileserver (requires AllFiles capability) - // Also, trying to cd() to a nonexistent directory causes *platsec* error. This does not cause functional harm, but should - // nevertheless be changed to use native Symbian methods to avoid unnecessary platsec warnings (as per qpluginloader.cpp). - // Use native Symbian code to check for directory existence, because checking - // for files from under non-existent protected dir like E:/private/<uid> using - // QDir::exists causes platform security violations on most apps. - QString nativePath = QDir::toNativeSeparators(dir.absolutePath()); - TPtrC ptr = TPtrC16(static_cast<const TUint16*>(nativePath.utf16()), nativePath.length()); - TUint attributes; - TInt err = rfs.Att(ptr, attributes); - if (err == KErrNone) { - // yes, the directory exists. - pathFound = true; - } - return pathFound; -} -#define CHECKDIR(dir) qSymbian_CheckDir(dir, rfs) -#else -#define CHECKDIR(dir) (dir).exists() -#endif - -inline QStringList mobilityPlugins(const QString& plugintype) -{ -#if !defined QT_NO_DEBUG - const bool showDebug = qgetenv("QT_DEBUG_PLUGINS").toInt() > 0; -#endif - - QStringList paths = QCoreApplication::libraryPaths(); -/*#ifdef QTM_PLUGIN_PATH - paths << QLatin1String(QTM_PLUGIN_PATH); -#endif*/ -#if !defined QT_NO_DEBUG - if (showDebug) - qDebug() << "Plugin paths:" << paths; -#endif - -#if defined(Q_OS_SYMBIAN) - RFs rfs; - qt_symbian_throwIfError(rfs.Connect()); -#endif - - // Temp variable to avoid multiple identical paths - // (we don't convert the list to set first, because that loses the order) - QSet<QString> processed; - - /* The list of discovered plugins */ - QStringList plugins; - - /* Enumerate our plugin paths */ - for (int i=0; i < paths.count(); i++) { - if (processed.contains(paths.at(i))) - continue; - processed.insert(paths.at(i)); - QDir pluginsDir(paths.at(i)); - if (!CHECKDIR(pluginsDir)) - continue; - -#if defined(Q_OS_WIN) - if (pluginsDir.dirName().toLower() == QLatin1String("debug") || pluginsDir.dirName().toLower() == QLatin1String("release")) - pluginsDir.cdUp(); -#elif defined(Q_OS_MAC) - if (pluginsDir.dirName() == QLatin1String("MacOS")) { - pluginsDir.cdUp(); - pluginsDir.cdUp(); - pluginsDir.cdUp(); - } -#endif - - QString subdir(QLatin1String("plugins/")); - subdir += plugintype; - if (pluginsDir.path().endsWith(QLatin1String("/plugins")) - || pluginsDir.path().endsWith(QLatin1String("/plugins/"))) - subdir = plugintype; - - if (CHECKDIR(QDir(pluginsDir.filePath(subdir)))) { - pluginsDir.cd(subdir); - QStringList files = pluginsDir.entryList(QDir::Files); - -#if !defined QT_NO_DEBUG - if (showDebug) - qDebug() << "Looking for " << plugintype << " plugins in" << pluginsDir.path() << files; -#endif - - for (int j=0; j < files.count(); j++) { - plugins << pluginsDir.absoluteFilePath(files.at(j)); - } - } - } - - /* Add application path + plugintype */ - QDir appldir(QCoreApplication::applicationDirPath()); - if(appldir.cd(plugintype)){ - if (!processed.contains(appldir.absolutePath())){ - processed.insert(appldir.absolutePath()); - QStringList files = appldir.entryList(QDir::Files); -#if !defined QT_NO_DEBUG - if (showDebug) - qDebug() << "Looking for " << plugintype << " plugins in" << appldir.path() << files; -#endif - for (int j=0; j < files.count(); j++) { - plugins << appldir.absoluteFilePath(files.at(j)); - } - } - } - -#if defined(Q_OS_SYMBIAN) - rfs.Close(); -#endif - return plugins; -} - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif diff --git a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp index 27f3de0d..4daba791 100644 --- a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp +++ b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.cpp @@ -67,6 +67,11 @@ QString QGeoServiceProviderFactoryNokia::providerName() const return "nokia"; } +QStringList QGeoServiceProviderFactoryNokia::keys() const +{ + return QStringList() << QLatin1String("nokia"); +} + int QGeoServiceProviderFactoryNokia::providerVersion() const { return 1; diff --git a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h index 2dddbe13..ac4e83be 100644 --- a/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h +++ b/src/plugins/geoservices/nokia/qgeoserviceproviderplugin_nokia.h @@ -57,13 +57,14 @@ QT_BEGIN_NAMESPACE class QGeoServiceProviderFactoryNokia : public QObject, public QGeoServiceProviderFactory { Q_OBJECT - Q_INTERFACES(QGeoServiceProviderFactory) + Q_INTERFACES(QGeoServiceProviderFactory:QFactoryInterface) public: QGeoServiceProviderFactoryNokia(); ~QGeoServiceProviderFactoryNokia(); QString providerName() const; int providerVersion() const; + QStringList keys() const; QGeocodingManagerEngine* createGeocodingManagerEngine(const QMap<QString, QVariant> ¶meters, QGeoServiceProvider::Error *error, diff --git a/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.cpp b/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.cpp index 6bad46c1..5bb88ad4 100644 --- a/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.cpp +++ b/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.cpp @@ -57,6 +57,11 @@ QString QGeoServiceProviderFactoryJsonDb::providerName() const return QLatin1String("nokia_places_jsondb"); } +QStringList QGeoServiceProviderFactoryJsonDb::keys() const +{ + return QStringList() << QLatin1String("nokia_places_jsondb"); +} + int QGeoServiceProviderFactoryJsonDb::providerVersion() const { return 1; diff --git a/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.h b/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.h index 4d1fc945..2408f3be 100644 --- a/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.h +++ b/src/plugins/geoservices/nokia_places_jsondb/qgeoserviceproviderplugin_jsondb.h @@ -50,7 +50,7 @@ QT_USE_NAMESPACE class QGeoServiceProviderFactoryJsonDb : public QObject, public QGeoServiceProviderFactory { Q_OBJECT - Q_INTERFACES(QGeoServiceProviderFactory) + Q_INTERFACES(QGeoServiceProviderFactory:QFactoryInterface) public: QGeoServiceProviderFactoryJsonDb(); ~QGeoServiceProviderFactoryJsonDb(); @@ -58,6 +58,8 @@ public: QString providerName() const; int providerVersion() const; + QStringList keys() const; + QGeocodingManagerEngine* createGeocodingManagerEngine(const QMap<QString, QVariant> ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; diff --git a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp index d6fe0c0c..36b1688b 100644 --- a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp +++ b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp @@ -59,6 +59,11 @@ QString QGeoServiceProviderFactoryTest::providerName() const return "qmlgeo.test.plugin"; } +QStringList QGeoServiceProviderFactoryTest::keys() const +{ + return QStringList() << QLatin1String("qmlgeo.test.plugin"); +} + int QGeoServiceProviderFactoryTest::providerVersion() const { return 3; diff --git a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h index a8b567a6..b2b5f357 100644 --- a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h +++ b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h @@ -50,13 +50,14 @@ QT_USE_NAMESPACE class QGeoServiceProviderFactoryTest: public QObject, public QGeoServiceProviderFactory { Q_OBJECT - Q_INTERFACES(QGeoServiceProviderFactory) + Q_INTERFACES(QGeoServiceProviderFactory:QFactoryInterface) public: QGeoServiceProviderFactoryTest(); ~QGeoServiceProviderFactoryTest(); QString providerName() const; int providerVersion() const; + QStringList keys() const; QGeoMappingManagerEngine* createMappingManagerEngine ( diff --git a/tests/auto/positionplugin/plugin.cpp b/tests/auto/positionplugin/plugin.cpp index abd51e02..5307c141 100644 --- a/tests/auto/positionplugin/plugin.cpp +++ b/tests/auto/positionplugin/plugin.cpp @@ -176,12 +176,14 @@ void DummySource::doTimeout() class QGeoPositionInfoSourceFactoryTest : public QObject, public QGeoPositionInfoSourceFactory { Q_OBJECT - Q_INTERFACES(QGeoPositionInfoSourceFactory) + Q_INTERFACES(QGeoPositionInfoSourceFactory:QFactoryInterface) public: QString sourceName() const; int sourceVersion() const; + QStringList keys() const { return QStringList() << QLatin1String("testposition.source"); } + QGeoPositionInfoSource *positionInfoSource(QObject *parent); QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent); }; diff --git a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp index cf837d10..bd69f373 100644 --- a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp +++ b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp @@ -57,6 +57,11 @@ QString QGeoServiceProviderFactoryTest::providerName() const return "static.geocode.test.plugin"; } +QStringList QGeoServiceProviderFactoryTest::keys() const +{ + return QStringList() << QLatin1String("static.geocode.test.plugin"); +} + int QGeoServiceProviderFactoryTest::providerVersion() const { return 3; diff --git a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h index 281942da..9a0acf82 100644 --- a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h +++ b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h @@ -50,13 +50,14 @@ QT_USE_NAMESPACE class QGeoServiceProviderFactoryTest: public QObject, public QGeoServiceProviderFactory { Q_OBJECT - Q_INTERFACES(QGeoServiceProviderFactory) + Q_INTERFACES(QGeoServiceProviderFactory:QFactoryInterface) public: QGeoServiceProviderFactoryTest(); ~QGeoServiceProviderFactoryTest(); QString providerName() const; int providerVersion() const; + QStringList keys() const; QGeocodingManagerEngine* createGeocodingManagerEngine(const QMap<QString, QVariant> ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; diff --git a/tests/plugins/declarativetestplugin/declarativetestplugin.pro b/tests/plugins/declarativetestplugin/declarativetestplugin.pro index 34372513..f5986904 100644 --- a/tests/plugins/declarativetestplugin/declarativetestplugin.pro +++ b/tests/plugins/declarativetestplugin/declarativetestplugin.pro @@ -22,7 +22,7 @@ SOURCES += locationtest.cpp \ ../../../src/imports/location/qdeclarativecoordinate.cpp # Tell qmake to create such makefile that qmldir and target (i.e. declarative_location) -# are both copied to qt/imports/QtMobility/location -directory, +# are both copied to qt/imports/QtLocation -directory, # as the "/imports" is the default place where qmlviewer looks for plugins # (otherwise qmlviewer -I <path> -option is needed) |