Browse Source

QGeoTiledMappingManagerEngineQGC: Use cameraCaps in QGeoMapType

In Qt 5.10 QGeoMapType need QGeoCameraCapabilities as argument
E.g: 2b230b0a10/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp (L167)
Fix #5916

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
QGC4.4
Patrick José Pereira 8 years ago
parent
commit
c7e236c303
  1. 18
      src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp

18
src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp

@ -73,14 +73,6 @@ QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject @@ -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 &parameters, QGeoServiceProvider::Error *error, QString *errorString)
: QGeoTiledMappingManagerEngine()
@ -94,6 +86,16 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian @@ -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.
*/

Loading…
Cancel
Save