diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-03-19 13:36:25 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-03-20 10:12:07 +0000 |
commit | 1ced79ad7cc256eb82113e3419cb09926ceae9c3 (patch) | |
tree | 64ad3f777fbf2b89075fb81fe4dcf63ee2128573 /src/location/maps/qgeoserviceproviderfactory.h | |
parent | a7de94c0a26d46cd6547529ad558fc172e32e325 (diff) | |
download | qtlocation-1ced79ad7cc256eb82113e3419cb09926ceae9c3.tar.gz |
QGeoServiceProviderFactory: Restore binary compatibility to Qt 5.10
Added a new QGeoServiceProviderFactoryV2 to load plugins offering
a navigation manager engine.
To be able to still load plugins compiled against Qt 5.10, both factories
are considered when loading plugins, using the pointer to the V2 only
when accessing the newly exposed functionality.
Change-Id: I8e5e868737c77142e77caaacef278686565928df
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeoserviceproviderfactory.h')
-rw-r--r-- | src/location/maps/qgeoserviceproviderfactory.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/location/maps/qgeoserviceproviderfactory.h b/src/location/maps/qgeoserviceproviderfactory.h index e1164189..1eb93a18 100644 --- a/src/location/maps/qgeoserviceproviderfactory.h +++ b/src/location/maps/qgeoserviceproviderfactory.h @@ -62,13 +62,25 @@ public: virtual QPlaceManagerEngine *createPlaceManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; +}; + +Q_DECLARE_INTERFACE(QGeoServiceProviderFactory, + "org.qt-project.qt.geoservice.serviceproviderfactory/5.0") + +class Q_LOCATION_EXPORT QGeoServiceProviderFactoryV2 : public QGeoServiceProviderFactory +{ +public: + virtual ~QGeoServiceProviderFactoryV2() {} + virtual QNavigationManagerEngine *createNavigationManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const; }; -Q_DECLARE_INTERFACE(QGeoServiceProviderFactory, - "org.qt-project.qt.geoservice.serviceproviderfactory/5.0") +// Although not actually used for constructing a specialized loader, this is required for +// casting a QObject * into QGeoServiceProviderFactoryV2 * +Q_DECLARE_INTERFACE(QGeoServiceProviderFactoryV2, + "org.qt-project.qt.geoservice.serviceproviderfactoryV2/5.0") QT_END_NAMESPACE |