Unverified Commit a5c6b0da authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5900 from patrickelectric/corrections

Code correction, Qt5.10 compatibility 
parents 5922c953 dff51b8d
...@@ -4,9 +4,9 @@ FlightDisplayView 1.0 FlightDisplayView.qml ...@@ -4,9 +4,9 @@ FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml
FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml
FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml
GuidedActionsConfirm 1.0 GuidedActionsConfirm.qml GuidedActionConfirm 1.0 GuidedActionConfirm.qml
GuidedActionsController 1.0 GuidedActionsController.qml GuidedActionsController 1.0 GuidedActionsController.qml
GuidedActionsList 1.0 GuidedActionsList.qml GuidedActionList 1.0 GuidedActionList.qml
GuidedAltitudeSlider 1.0 GuidedAltitudeSlider.qml GuidedAltitudeSlider 1.0 GuidedAltitudeSlider.qml
MultiVehicleList 1.0 MultiVehicleList.qml MultiVehicleList 1.0 MultiVehicleList.qml
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
#include <QtLocation/private/qgeocameracapabilities_p.h> #include <QtLocation/private/qgeocameracapabilities_p.h>
#include <QtLocation/private/qgeomaptype_p.h> #include <QtLocation/private/qgeomaptype_p.h>
#if QT_VERSION < 0x050500 #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
#include <QtLocation/private/qgeotiledmapdata_p.h> #include <QtLocation/private/qgeotiledmapdata_p.h>
#else #else
#include <QtLocation/private/qgeotiledmap_p.h> #include <QtLocation/private/qgeotiledmap_p.h>
#if QT_VERSION >= 0x050600 #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
#include <QtLocation/private/qgeofiletilecache_p.h> #include <QtLocation/private/qgeofiletilecache_p.h>
#else #else
#include <QtLocation/private/qgeotilecache_p.h> #include <QtLocation/private/qgeotilecache_p.h>
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#include <QDir> #include <QDir>
#include <QStandardPaths> #include <QStandardPaths>
#if QT_VERSION >= 0x050500 #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject *parent) QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject *parent)
: QGeoTiledMap(engine, parent) : QGeoTiledMap(engine, parent)
...@@ -73,7 +73,9 @@ QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject ...@@ -73,7 +73,9 @@ QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject
} }
#endif #endif
#if QT_VERSION >= 0x050900 #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")) #define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f,QByteArray("QGroundControl"))
#else #else
#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f) #define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f)
...@@ -165,7 +167,7 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian ...@@ -165,7 +167,7 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
getQGCMapEngine()->setUserAgent(parameters.value(QStringLiteral("useragent")).toString().toLatin1()); getQGCMapEngine()->setUserAgent(parameters.value(QStringLiteral("useragent")).toString().toLatin1());
} }
#if QT_VERSION >= 0x050500 #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
_setCache(parameters); _setCache(parameters);
#endif #endif
...@@ -180,7 +182,7 @@ QGeoTiledMappingManagerEngineQGC::~QGeoTiledMappingManagerEngineQGC() ...@@ -180,7 +182,7 @@ QGeoTiledMappingManagerEngineQGC::~QGeoTiledMappingManagerEngineQGC()
{ {
} }
#if QT_VERSION < 0x050500 #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
QGeoMapData *QGeoTiledMappingManagerEngineQGC::createMapData() QGeoMapData *QGeoTiledMappingManagerEngineQGC::createMapData()
...@@ -199,7 +201,7 @@ QGeoTiledMappingManagerEngineQGC::createMap() ...@@ -199,7 +201,7 @@ QGeoTiledMappingManagerEngineQGC::createMap()
#endif #endif
#if QT_VERSION >= 0x050500 #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters) QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters)
...@@ -242,7 +244,7 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters) ...@@ -242,7 +244,7 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters)
if(memLimit > 1024 * 1024 * 1024) if(memLimit > 1024 * 1024 * 1024)
memLimit = 1024 * 1024 * 1024; memLimit = 1024 * 1024 * 1024;
//-- Disable Qt's disk cache (sort of) //-- 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); QAbstractGeoTileCache *pTileCache = new QGeoFileTileCache(cacheDir);
setTileCache(pTileCache); setTileCache(pTileCache);
#else #else
......
...@@ -48,12 +48,12 @@ ...@@ -48,12 +48,12 @@
#define QGEOTILEDMAPPINGMANAGERENGINEQGC_H #define QGEOTILEDMAPPINGMANAGERENGINEQGC_H
#include <QtLocation/QGeoServiceProvider> #include <QtLocation/QGeoServiceProvider>
#if QT_VERSION >= 0x050500 #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
#include <QtLocation/private/qgeotiledmap_p.h> #include <QtLocation/private/qgeotiledmap_p.h>
#endif #endif
#include <QtLocation/private/qgeotiledmappingmanagerengine_p.h> #include <QtLocation/private/qgeotiledmappingmanagerengine_p.h>
#if QT_VERSION >= 0x050500 #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
class QGeoTiledMapQGC : public QGeoTiledMap class QGeoTiledMapQGC : public QGeoTiledMap
{ {
Q_OBJECT Q_OBJECT
...@@ -70,13 +70,13 @@ class QGeoTiledMappingManagerEngineQGC : public QGeoTiledMappingManagerEngine ...@@ -70,13 +70,13 @@ class QGeoTiledMappingManagerEngineQGC : public QGeoTiledMappingManagerEngine
public: public:
QGeoTiledMappingManagerEngineQGC(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString); QGeoTiledMappingManagerEngineQGC(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString);
~QGeoTiledMappingManagerEngineQGC(); ~QGeoTiledMappingManagerEngineQGC();
#if QT_VERSION < 0x050500 #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
QGeoMapData *createMapData(); QGeoMapData *createMapData();
#else #else
QGeoMap *createMap(); QGeoMap *createMap();
#endif #endif
private: private:
#if QT_VERSION >= 0x050500 #if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
void _setCache(const QVariantMap &parameters); void _setCache(const QVariantMap &parameters);
#endif #endif
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment