From c7e236c3032b7f7cf63a02222c8f32a70f58296a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 29 Dec 2017 11:07:47 -0200 Subject: [PATCH] QGeoTiledMappingManagerEngineQGC: Use cameraCaps in QGeoMapType MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In Qt 5.10 QGeoMapType need QGeoCameraCapabilities as argument E.g: https://github.com/qt/qtlocation/blob/2b230b0a10d898979e9d5193f4da2e408b397fe3/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp#L167 Fix #5916 Signed-off-by: Patrick José Pereira --- .../QGeoTiledMappingManagerEngineQGC.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp index 01463d078..5a41dfeb5 100644 --- a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp +++ b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp @@ -73,14 +73,6 @@ QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject } #endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) -#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f,QByteArray("QGroundControl"), QGeoCameraCapabilities()) -#elif QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) -#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f,QByteArray("QGroundControl")) -#else -#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f) -#endif - //----------------------------------------------------------------------------- QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) : QGeoTiledMappingManagerEngine() @@ -94,6 +86,16 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian setTileSize(QSize(256, 256)); + // In Qt 5.10 QGeoMapType need QGeoCameraCapabilities as argument + // E.g: https://github.com/qt/qtlocation/blob/2b230b0a10d898979e9d5193f4da2e408b397fe3/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp#L167 + #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + #define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f,QByteArray("QGroundControl"), cameraCaps) + #elif QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) + #define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f,QByteArray("QGroundControl")) + #else + #define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f) + #endif + /* * Google and Bing don't seem kosher at all. This was based on original code from OpenPilot and heavily modified to be used in QGC. */ -- 2.22.0