diff options
author | David Laing <david.laing@nokia.com> | 2012-03-16 15:03:30 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-20 05:42:53 +0100 |
commit | f3174fa642f2ccd2c0cad9604878abf2d158aec4 (patch) | |
tree | 316c7da5cbb3a6d8c19cb3941362cf7e13f23f9c /tests/auto/geotestplugin | |
parent | 908108424ad41425a257cfe2ad0d7c97f6822597 (diff) | |
download | qtlocation-f3174fa642f2ccd2c0cad9604878abf2d158aec4.tar.gz |
Coverity fixes, the sequel.
Change-Id: Icbe91d0f348e60a24599e2f93a719fafedf26708
Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Diffstat (limited to 'tests/auto/geotestplugin')
-rw-r--r-- | tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h | 2 | ||||
-rw-r--r-- | tests/auto/geotestplugin/qgeotilefetcher_test.h | 23 |
2 files changed, 15 insertions, 10 deletions
diff --git a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h index 559266b8..9fccf9de 100644 --- a/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h +++ b/tests/auto/geotestplugin/qgeotiledmappingmanagerengine_test.h @@ -79,7 +79,7 @@ public: setTileSize(QSize(256, 256)); QGeoTileFetcherTest *fetcher = new QGeoTileFetcherTest(this); - fetcher->setParams(¶meters); + fetcher->setParams(parameters); fetcher->setTileSize(QSize(256, 255)); setTileFetcher(fetcher); } diff --git a/tests/auto/geotestplugin/qgeotilefetcher_test.h b/tests/auto/geotestplugin/qgeotilefetcher_test.h index 45788141..09337bad 100644 --- a/tests/auto/geotestplugin/qgeotilefetcher_test.h +++ b/tests/auto/geotestplugin/qgeotilefetcher_test.h @@ -55,6 +55,7 @@ #include <QTimer> #include <QDebug> #include <QTimerEvent> +#include <QVariant> QT_USE_NAMESPACE @@ -79,12 +80,16 @@ class QGeoTileFetcherTest: public QGeoTileFetcher Q_OBJECT public: QGeoTileFetcherTest(QGeoTiledMappingManagerEngine *engine, QObject *parent = 0) - : QGeoTileFetcher(engine, parent) {} + : QGeoTileFetcher(engine, parent), + finishRequestImmediately_(false), + mappingReply_(0), + timerId_(0), + errorCode_(QGeoTiledMapReply::NoError) {} bool init() { - if (m_parameters->contains("finishRequestImmediately")) - finishRequestImmediately_ = qvariant_cast<bool>(m_parameters->value("finishRequestImmediately")); + if (parameters_.contains("finishRequestImmediately")) + finishRequestImmediately_ = parameters_.value("finishRequestImmediately").toBool(); return true; } @@ -123,17 +128,17 @@ public: mappingReply_->callSetMapImageFormat("png"); mappingReply_->callSetFinished(true); - return static_cast<QGeoTiledMapReply*>(mappingReply_); + return mappingReply_; } - void setParams(const QMap<QString, QVariant> *parameters) + void setParams(const QMap<QString, QVariant> ¶meters) { - m_parameters = parameters; + parameters_ = parameters; } void setTileSize(QSize tileSize) { - m_tileSize = tileSize; + tileSize_ = tileSize; } public Q_SLOTS: @@ -170,8 +175,8 @@ private: int timerId_; QGeoTiledMapReply::Error errorCode_; QString errorString_; - const QMap<QString, QVariant> *m_parameters; - QSize m_tileSize; + QMap<QString, QVariant> parameters_; + QSize tileSize_; }; #endif |