diff --git a/QGCCommon.pri b/QGCCommon.pri index 1c2bdb696fd46816429773c74d14373dcf72f1d8..1d04930457dca39ec7239d4ee895c028709fa271 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -60,7 +60,11 @@ linux { DEFINES += __macos__ CONFIG += x86_64 CONFIG -= x86 +equals(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 5) { + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 +} else { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 +} QMAKE_MAC_SDK = macosx10.11 QMAKE_CXXFLAGS += -fvisibility=hidden } else { diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index e7c50a83b8d721b42e05f4f950eccb239c39b13b..d7697da59f2bbdbdf06eaaa3f05350923df7c4fe 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -103,6 +103,9 @@ MacBuild { QMAKE_INFO_PLIST = Custom-Info.plist ICON = $${BASEDIR}/resources/icons/macx.icns OTHER_FILES += Custom-Info.plist +equals(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 5) { + LIBS += -framework ApplicationServices +} } iOSBuild { diff --git a/src/FlightMap/FlightMap.qml b/src/FlightMap/FlightMap.qml index 0245beb610f6e4903e8ae7fb9e9d787cfb479192..9f07ce7af625d403ad339a88f17f1af51ce8856a 100644 --- a/src/FlightMap/FlightMap.qml +++ b/src/FlightMap/FlightMap.qml @@ -53,7 +53,8 @@ Map { zoomLevel: 18 center: QGroundControl.lastKnownHomePosition gesture.flickDeceleration: 3000 - gesture.activeGestures: MapGestureArea.ZoomGesture | MapGestureArea.PanGesture | MapGestureArea.FlickGesture + // This no longer exists in Qt 5.6. The options below also happen the be the default anyway. + //gesture.activeGestures: MapGestureArea.ZoomGesture | MapGestureArea.PanGesture | MapGestureArea.FlickGesture plugin: Plugin { name: "QGroundControl" } diff --git a/src/QtLocationPlugin/QGCLocationPlugin.pri b/src/QtLocationPlugin/QGCLocationPlugin.pri index 9e44cae4f498d6c4bc61194b54d5d5bdb90df2b8..fd31ddd6e82bf0707227fabdb2778fafa816e9d3 100644 --- a/src/QtLocationPlugin/QGCLocationPlugin.pri +++ b/src/QtLocationPlugin/QGCLocationPlugin.pri @@ -2,18 +2,12 @@ QT += location-private positioning-private network contains(QT_VERSION, 5.5.1) { - message(Using Local QtLocation headers for Qt 5.5.1) - INCLUDEPATH += \ $$PWD/qtlocation/include \ - } else { - message(Using Default QtLocation headers) - INCLUDEPATH += $$QT.location.includes - } HEADERS += \ diff --git a/src/QtLocationPlugin/QGeoTileFetcherQGC.h b/src/QtLocationPlugin/QGeoTileFetcherQGC.h index 846306351f68635f707f821fa3c5b8b282ef739c..54f507a7a7b8436bd51805159910b52f28d2c45b 100644 --- a/src/QtLocationPlugin/QGeoTileFetcherQGC.h +++ b/src/QtLocationPlugin/QGeoTileFetcherQGC.h @@ -48,7 +48,6 @@ #define QGEOTILEFETCHERQGC_H #include -#include #include "QGCMapUrlEngine.h" class QGeoTiledMappingManagerEngine; diff --git a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp index 20dac6d3b46fed675a9e52af3066ce6c56fcf4ca..c663ff9042c20c0db6840c894358e1b8b05dbda7 100644 --- a/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp +++ b/src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp @@ -54,7 +54,13 @@ #include #else #include +#if QT_VERSION >= 0x050600 +#include +#else +#include +#endif #endif + #include #include @@ -225,7 +231,12 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap ¶meters) if(memLimit < 1024 * 1024) memLimit = 1024 * 1024; //-- Disable Qt's disk cache (set memory cache otherwise Qtlocation won't work) +#if QT_VERSION >= 0x050600 + QAbstractGeoTileCache *pTileCache = new QGeoFileTileCache(cacheDir); + setTileCache(pTileCache); +#else QGeoTileCache* pTileCache = createTileCacheWithDir(cacheDir); +#endif if(pTileCache) { //-- We're basically telling it to use 100k of disk for cache. It doesn't like