summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeoserviceprovider_p.h
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-04-18 14:16:32 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-20 08:11:12 +0200
commit1925ba8da6fd9c93dcea3636af527d30ffea3d2e (patch)
tree7e788d8f17ce893ba95ccb0cc73bd03deb620336 /src/location/maps/qgeoserviceprovider_p.h
parent65a85f6f49f3ff305cb3517151ba0addc28aa374 (diff)
downloadqtlocation-1925ba8da6fd9c93dcea3636af527d30ffea3d2e.tar.gz
Clean up duplicated code in qgeoserviceprovider.cpp
Duplication reduction with the Power of Templates (tm). Change-Id: I119d83bdc965416788263b295e368b243c2b897e Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/maps/qgeoserviceprovider_p.h')
-rw-r--r--src/location/maps/qgeoserviceprovider_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/location/maps/qgeoserviceprovider_p.h b/src/location/maps/qgeoserviceprovider_p.h
index 191f3517..f1d24ddf 100644
--- a/src/location/maps/qgeoserviceprovider_p.h
+++ b/src/location/maps/qgeoserviceprovider_p.h
@@ -77,6 +77,14 @@ public:
void loadMeta();
void loadPlugin(const QMap<QString, QVariant> &parameters);
void unload();
+
+ /* helper templates for generating the feature and manager accessors */
+ template <class Manager, class Engine>
+ Manager *manager(QGeoServiceProvider::Error *error,
+ QString *errorString, Manager **manager);
+ template <class Flags>
+ Flags features(const char *enumName);
+
QGeoServiceProviderFactory *factory;
QJsonObject metaData;