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
FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml
FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml
FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml
GuidedActionsConfirm 1.0 GuidedActionsConfirm.qml
GuidedActionConfirm 1.0 GuidedActionConfirm.qml
GuidedActionsController 1.0 GuidedActionsController.qml
GuidedActionsList 1.0 GuidedActionsList.qml
GuidedActionList 1.0 GuidedActionList.qml
GuidedAltitudeSlider 1.0 GuidedAltitudeSlider.qml
MultiVehicleList 1.0 MultiVehicleList.qml
......@@ -50,11 +50,11 @@
#include <QtLocation/private/qgeocameracapabilities_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>
#else
#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>
#else
#include <QtLocation/private/qgeotilecache_p.h>
......@@ -64,7 +64,7 @@
#include <QDir>
#include <QStandardPaths>
#if QT_VERSION >= 0x050500
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
//-----------------------------------------------------------------------------
QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject *parent)
: QGeoTiledMap(engine, parent)
......@@ -73,7 +73,9 @@ QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject
}
#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"))
#else
#define QGCGEOMAPTYPE(a,b,c,d,e,f) QGeoMapType(a,b,c,d,e,f)
......@@ -165,7 +167,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 +182,7 @@ QGeoTiledMappingManagerEngineQGC::~QGeoTiledMappingManagerEngineQGC()
{
}
#if QT_VERSION < 0x050500
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
//-----------------------------------------------------------------------------
QGeoMapData *QGeoTiledMappingManagerEngineQGC::createMapData()
......@@ -199,7 +201,7 @@ QGeoTiledMappingManagerEngineQGC::createMap()
#endif
#if QT_VERSION >= 0x050500
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
//-----------------------------------------------------------------------------
void
QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters)
......@@ -242,7 +244,7 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters)
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
......
......@@ -48,12 +48,12 @@
#define QGEOTILEDMAPPINGMANAGERENGINEQGC_H
#include <QtLocation/QGeoServiceProvider>
#if QT_VERSION >= 0x050500
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
#include <QtLocation/private/qgeotiledmap_p.h>
#endif
#include <QtLocation/private/qgeotiledmappingmanagerengine_p.h>
#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 &parameters, 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 &parameters);
#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