From 1925ba8da6fd9c93dcea3636af527d30ffea3d2e Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Wed, 18 Apr 2012 14:16:32 +1000 Subject: Clean up duplicated code in qgeoserviceprovider.cpp Duplication reduction with the Power of Templates (tm). Change-Id: I119d83bdc965416788263b295e368b243c2b897e Reviewed-by: Aaron McCarthy --- src/location/maps/qgeoserviceprovider_p.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/location/maps/qgeoserviceprovider_p.h') 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 ¶meters); void unload(); + + /* helper templates for generating the feature and manager accessors */ + template + Manager *manager(QGeoServiceProvider::Error *error, + QString *errorString, Manager **manager); + template + Flags features(const char *enumName); + QGeoServiceProviderFactory *factory; QJsonObject metaData; -- cgit v1.2.1