From a701991c5bca8baeb7cca4f4f72a1acc387c5303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Tue, 19 Dec 2017 12:52:37 -0200 Subject: [PATCH] Move code to use QT_VERSION_CHECK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .../QGeoTiledMappingManagerEngineQGC.cpp | 14 +++++++------- .../QGeoTiledMappingManagerEngineQGC.h | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp index 3a74c2801..871f3ab62 100644 --- a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp +++ b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp @@ -50,11 +50,11 @@ #include #include -#if QT_VERSION < 0x050500 +#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include #else #include -#if QT_VERSION >= 0x050600 +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) #include #else #include @@ -64,7 +64,7 @@ #include #include -#if QT_VERSION >= 0x050500 +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) //----------------------------------------------------------------------------- QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject *parent) : QGeoTiledMap(engine, parent) @@ -165,7 +165,7 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian getQGCMapEngine()->setUserAgent(parameters.value(QStringLiteral("useragent")).toString().toLatin1()); } -#if QT_VERSION >= 0x050500 +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) _setCache(parameters); #endif @@ -180,7 +180,7 @@ QGeoTiledMappingManagerEngineQGC::~QGeoTiledMappingManagerEngineQGC() { } -#if QT_VERSION < 0x050500 +#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) //----------------------------------------------------------------------------- QGeoMapData *QGeoTiledMappingManagerEngineQGC::createMapData() @@ -199,7 +199,7 @@ QGeoTiledMappingManagerEngineQGC::createMap() #endif -#if QT_VERSION >= 0x050500 +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) //----------------------------------------------------------------------------- void QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap ¶meters) @@ -242,7 +242,7 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap ¶meters) if(memLimit > 1024 * 1024 * 1024) memLimit = 1024 * 1024 * 1024; //-- Disable Qt's disk cache (sort of) -#if QT_VERSION >= 0x050600 +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) QAbstractGeoTileCache *pTileCache = new QGeoFileTileCache(cacheDir); setTileCache(pTileCache); #else diff --git a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.h b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.h index f3fe98aab..b434b7c65 100644 --- a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.h +++ b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.h @@ -48,12 +48,12 @@ #define QGEOTILEDMAPPINGMANAGERENGINEQGC_H #include -#if QT_VERSION >= 0x050500 +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) #include #endif #include -#if QT_VERSION >= 0x050500 +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) class QGeoTiledMapQGC : public QGeoTiledMap { Q_OBJECT @@ -70,13 +70,13 @@ class QGeoTiledMappingManagerEngineQGC : public QGeoTiledMappingManagerEngine public: QGeoTiledMappingManagerEngineQGC(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString); ~QGeoTiledMappingManagerEngineQGC(); -#if QT_VERSION < 0x050500 +#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) QGeoMapData *createMapData(); #else QGeoMap *createMap(); #endif private: -#if QT_VERSION >= 0x050500 +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) void _setCache(const QVariantMap ¶meters); #endif }; -- 2.22.0