summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-01-06 16:39:10 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-08 09:01:28 +0100
commit4d3134b673faf5eb3c84e37bff25c8d678172ee3 (patch)
tree06b053e2a5c9803ca53c46f57878da679a7b2efa /tests
parenta12f2caf8fd801fc84953072bae7d185ba0ed109 (diff)
downloadqtlocation-4d3134b673faf5eb3c84e37bff25c8d678172ee3.tar.gz
Use QVariantMap instead of QMap<QString, QVariant>.
It is shorter, easier to read, easier to type and it doesn't affect the ABI. Change-Id: Ic4d8a371d00b434ac84382dd75d8d82a963089cb Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/geotestplugin/qgeocodingmanagerengine_test.h2
-rw-r--r--tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h2
-rw-r--r--tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp10
-rw-r--r--tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h8
-rw-r--r--tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h2
-rw-r--r--tests/auto/geotestplugin/qgeotilefetcher_test.h4
-rw-r--r--tests/auto/geotestplugin/qplacemanagerengine_test.h2
-rw-r--r--tests/auto/nokia_services/routing/tst_routing.cpp2
-rw-r--r--tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.cpp2
-rw-r--r--tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.h2
-rw-r--r--tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h2
-rw-r--r--tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp2
-rw-r--r--tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h2
-rw-r--r--tests/auto/qgeomapcontroller/tst_qgeomapcontroller.cpp2
-rw-r--r--tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerengine_test.h2
-rw-r--r--tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.cpp5
-rw-r--r--tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.h2
-rw-r--r--tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp2
18 files changed, 28 insertions, 27 deletions
diff --git a/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h b/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
index 29058c83..b48c0bb0 100644
--- a/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
+++ b/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
@@ -82,7 +82,7 @@ class QGeoCodingManagerEngineTest: public QGeoCodingManagerEngine
{
Q_OBJECT
public:
- QGeoCodingManagerEngineTest(const QMap<QString, QVariant> &parameters,
+ QGeoCodingManagerEngineTest(const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) :
QGeoCodingManagerEngine(parameters),
validateWellKnownValues_(false),
diff --git a/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h b/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h
index ebdd3fa7..b9612ba9 100644
--- a/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h
+++ b/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h
@@ -83,7 +83,7 @@ class QGeoRoutingManagerEngineTest: public QGeoRoutingManagerEngine
QString errorString_;
public:
- QGeoRoutingManagerEngineTest(const QMap<QString, QVariant> &parameters,
+ QGeoRoutingManagerEngineTest(const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) :
QGeoRoutingManagerEngine(parameters),
routeReply_(0),
diff --git a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp
index b902d75c..5e770475 100644
--- a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp
+++ b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.cpp
@@ -56,15 +56,15 @@ QGeoServiceProviderFactoryTest::~QGeoServiceProviderFactoryTest()
}
QGeoRoutingManagerEngine* QGeoServiceProviderFactoryTest::createRoutingManagerEngine(
- const QMap<QString, QVariant> & parameters,
- QGeoServiceProvider::Error * error, QString *errorString) const
+ const QVariantMap &parameters,
+ QGeoServiceProvider::Error *error, QString *errorString) const
{
return new QGeoRoutingManagerEngineTest(parameters, error, errorString);
}
QGeoCodingManagerEngine* QGeoServiceProviderFactoryTest::createGeocodingManagerEngine(
- const QMap<QString, QVariant> &parameters, QGeoServiceProvider::Error *error,
+ const QVariantMap &parameters, QGeoServiceProvider::Error *error,
QString *errorString) const
{
return new QGeoCodingManagerEngineTest(parameters, error, errorString);
@@ -72,14 +72,14 @@ QGeoCodingManagerEngine* QGeoServiceProviderFactoryTest::createGeocodingManagerE
QGeoMappingManagerEngine* QGeoServiceProviderFactoryTest::createMappingManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const
{
return new QGeoTiledMappingManagerEngineTest(parameters, error, errorString);
}
QPlaceManagerEngine* QGeoServiceProviderFactoryTest::createPlaceManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const
{
Q_UNUSED(error);
diff --git a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h
index 84939133..3b62850b 100644
--- a/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h
+++ b/tests/auto/geotestplugin/qgeoserviceproviderplugin_test.h
@@ -59,16 +59,16 @@ public:
~QGeoServiceProviderFactoryTest();
QGeoMappingManagerEngine* createMappingManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const;
QGeoRoutingManagerEngine* createRoutingManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString ) const;
QGeoCodingManagerEngine* createGeocodingManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const;
QPlaceManagerEngine* createPlaceManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const;
};
diff --git a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h
index 5e166544..1a499792 100644
--- a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h
+++ b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h
@@ -58,7 +58,7 @@ class QGeoTiledMappingManagerEngineTest: public QGeoTiledMappingManagerEngine
{
Q_OBJECT
public:
- QGeoTiledMappingManagerEngineTest(const QMap<QString, QVariant> &parameters,
+ QGeoTiledMappingManagerEngineTest(const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) :
QGeoTiledMappingManagerEngine()
{
diff --git a/tests/auto/geotestplugin/qgeotilefetcher_test.h b/tests/auto/geotestplugin/qgeotilefetcher_test.h
index 7affbc69..2f2754cf 100644
--- a/tests/auto/geotestplugin/qgeotilefetcher_test.h
+++ b/tests/auto/geotestplugin/qgeotilefetcher_test.h
@@ -130,7 +130,7 @@ public:
return mappingReply_;
}
- void setParams(const QMap<QString, QVariant> &parameters)
+ void setParams(const QVariantMap &parameters)
{
parameters_ = parameters;
}
@@ -174,7 +174,7 @@ private:
int timerId_;
QGeoTiledMapReply::Error errorCode_;
QString errorString_;
- QMap<QString, QVariant> parameters_;
+ QVariantMap parameters_;
QSize tileSize_;
};
diff --git a/tests/auto/geotestplugin/qplacemanagerengine_test.h b/tests/auto/geotestplugin/qplacemanagerengine_test.h
index 6096ffe1..816493d0 100644
--- a/tests/auto/geotestplugin/qplacemanagerengine_test.h
+++ b/tests/auto/geotestplugin/qplacemanagerengine_test.h
@@ -208,7 +208,7 @@ class QPlaceManagerEngineTest : public QPlaceManagerEngine
{
Q_OBJECT
public:
- QPlaceManagerEngineTest(const QMap<QString, QVariant> &parameters)
+ QPlaceManagerEngineTest(const QVariantMap &parameters)
: QPlaceManagerEngine(parameters)
{
m_locales << QLocale();
diff --git a/tests/auto/nokia_services/routing/tst_routing.cpp b/tests/auto/nokia_services/routing/tst_routing.cpp
index f3e24a93..95d034da 100644
--- a/tests/auto/nokia_services/routing/tst_routing.cpp
+++ b/tests/auto/nokia_services/routing/tst_routing.cpp
@@ -335,7 +335,7 @@ void tst_nokia_routing::initTestCase()
m_networkManager = new MockGeoNetworkAccessManager();
- QMap<QString, QVariant> parameters;
+ QVariantMap parameters;
parameters.insert(QStringLiteral("nam"), QVariant::fromValue<void*>(m_networkManager));
parameters.insert(QStringLiteral("app_id"), "stub");
parameters.insert(QStringLiteral("token"), "stub");
diff --git a/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.cpp b/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.cpp
index 710fb97b..20c88d27 100644
--- a/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.cpp
+++ b/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.cpp
@@ -53,7 +53,7 @@ QGeoServiceProviderFactoryTest::~QGeoServiceProviderFactoryTest()
}
QPlaceManagerEngine *QGeoServiceProviderFactoryTest::createPlaceManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const
{
Q_UNUSED(error);
diff --git a/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.h b/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.h
index 210ac7cc..66869947 100644
--- a/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.h
+++ b/tests/auto/placesplugin_unsupported/qgeoserviceproviderplugin_test.h
@@ -57,7 +57,7 @@ public:
QGeoServiceProviderFactoryTest();
~QGeoServiceProviderFactoryTest();
- QPlaceManagerEngine *createPlaceManagerEngine(const QMap<QString, QVariant> &parameters,
+ QPlaceManagerEngine *createPlaceManagerEngine(const QVariantMap &parameters,
QGeoServiceProvider::Error *error,
QString *errorString) const;
};
diff --git a/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h b/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h
index c1c17b1b..ada63803 100644
--- a/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h
+++ b/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h
@@ -73,7 +73,7 @@ class QGeoCodingManagerEngineTest: public QGeoCodingManagerEngine
{
Q_OBJECT
public:
- QGeoCodingManagerEngineTest(const QMap<QString, QVariant> &parameters,
+ QGeoCodingManagerEngineTest(const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) :
QGeoCodingManagerEngine(parameters)
{
diff --git a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp
index d16ba32e..878c0fa1 100644
--- a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp
+++ b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.cpp
@@ -53,7 +53,7 @@ QGeoServiceProviderFactoryTest::~QGeoServiceProviderFactoryTest()
}
QGeoCodingManagerEngine* QGeoServiceProviderFactoryTest::createGeocodingManagerEngine(
- const QMap<QString, QVariant> &parameters, QGeoServiceProvider::Error *error,
+ const QVariantMap &parameters, QGeoServiceProvider::Error *error,
QString *errorString) const
{
return new QGeoCodingManagerEngineTest(parameters, error, errorString);
diff --git a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h
index c49e90bb..fe442b4f 100644
--- a/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h
+++ b/tests/auto/qgeocodingmanagerplugins/qgeoserviceproviderplugin_test.h
@@ -59,7 +59,7 @@ public:
~QGeoServiceProviderFactoryTest();
QGeoCodingManagerEngine* createGeocodingManagerEngine(
- const QMap<QString, QVariant> &parameters,
+ const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const;
};
diff --git a/tests/auto/qgeomapcontroller/tst_qgeomapcontroller.cpp b/tests/auto/qgeomapcontroller/tst_qgeomapcontroller.cpp
index 0123d375..7b7f8b98 100644
--- a/tests/auto/qgeomapcontroller/tst_qgeomapcontroller.cpp
+++ b/tests/auto/qgeomapcontroller/tst_qgeomapcontroller.cpp
@@ -91,7 +91,7 @@ tst_QGeoMapController::tst_QGeoMapController()
QGeoServiceProviderFactoryTest serviceProviderTest; // empty constructor
// TODO: check whether the default constructors of these objects allow the create to work
- QMap<QString, QVariant> parameterMap;
+ QVariantMap parameterMap;
QGeoServiceProvider::Error mappingError;
QString mappingErrorString;
diff --git a/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerengine_test.h b/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerengine_test.h
index 7bfb506c..33dfba4a 100644
--- a/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerengine_test.h
+++ b/tests/auto/qgeoroutingmanagerplugins/qgeoroutingmanagerengine_test.h
@@ -55,7 +55,7 @@ class QGeoRoutingManagerEngineTest: public QGeoRoutingManagerEngine
{
Q_OBJECT
public:
- QGeoRoutingManagerEngineTest(const QMap<QString, QVariant> &parameters,
+ QGeoRoutingManagerEngineTest(const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) :
QGeoRoutingManagerEngine(parameters)
{
diff --git a/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.cpp b/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.cpp
index 1f3a1b50..8079ed21 100644
--- a/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.cpp
+++ b/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.cpp
@@ -52,8 +52,9 @@ QGeoServiceProviderFactoryTest::~QGeoServiceProviderFactoryTest()
{
}
-QGeoRoutingManagerEngine* QGeoServiceProviderFactoryTest::createRoutingManagerEngine(const QMap<
- QString, QVariant> &parameters, QGeoServiceProvider::Error *error, QString *errorString) const
+QGeoRoutingManagerEngine* QGeoServiceProviderFactoryTest::createRoutingManagerEngine(
+ const QVariantMap &parameters, QGeoServiceProvider::Error *error,
+ QString *errorString) const
{
return new QGeoRoutingManagerEngineTest(parameters, error, errorString);
}
diff --git a/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.h b/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.h
index 1d6ceb96..bb4ac7ee 100644
--- a/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.h
+++ b/tests/auto/qgeoroutingmanagerplugins/qgeoserviceproviderplugin_test.h
@@ -58,7 +58,7 @@ public:
QGeoServiceProviderFactoryTest();
~QGeoServiceProviderFactoryTest();
- QGeoRoutingManagerEngine* createRoutingManagerEngine(const QMap<QString, QVariant> &parameters,
+ QGeoRoutingManagerEngine* createRoutingManagerEngine(const QVariantMap &parameters,
QGeoServiceProvider::Error *error, QString *errorString) const;
};
diff --git a/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp b/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp
index 74c33d86..c8128925 100644
--- a/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp
+++ b/tests/auto/qplacemanager_nokia/tst_qplacemanager_nokia.cpp
@@ -91,7 +91,7 @@ void tst_QPlaceManagerNokia::initTestCase()
QStringList providers = QGeoServiceProvider::availableServiceProviders();
- QMap<QString, QVariant> params;
+ QVariantMap params;
params.insert("app_id", "stub");
params.insert("token", "stub");
provider = new QGeoServiceProvider("nokia", params);