Commit cfd54d02 authored by dogmaphobic's avatar dogmaphobic

Initial Qt 5.6 build support.

parent 7aeb8a5f
...@@ -60,7 +60,11 @@ linux { ...@@ -60,7 +60,11 @@ linux {
DEFINES += __macos__ DEFINES += __macos__
CONFIG += x86_64 CONFIG += x86_64
CONFIG -= x86 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_MACOSX_DEPLOYMENT_TARGET = 10.6
}
QMAKE_MAC_SDK = macosx10.11 QMAKE_MAC_SDK = macosx10.11
QMAKE_CXXFLAGS += -fvisibility=hidden QMAKE_CXXFLAGS += -fvisibility=hidden
} else { } else {
......
...@@ -103,6 +103,9 @@ MacBuild { ...@@ -103,6 +103,9 @@ MacBuild {
QMAKE_INFO_PLIST = Custom-Info.plist QMAKE_INFO_PLIST = Custom-Info.plist
ICON = $${BASEDIR}/resources/icons/macx.icns ICON = $${BASEDIR}/resources/icons/macx.icns
OTHER_FILES += Custom-Info.plist OTHER_FILES += Custom-Info.plist
equals(QT_MAJOR_VERSION, 5) | greaterThan(QT_MINOR_VERSION, 5) {
LIBS += -framework ApplicationServices
}
} }
iOSBuild { iOSBuild {
......
...@@ -53,7 +53,8 @@ Map { ...@@ -53,7 +53,8 @@ Map {
zoomLevel: 18 zoomLevel: 18
center: QGroundControl.lastKnownHomePosition center: QGroundControl.lastKnownHomePosition
gesture.flickDeceleration: 3000 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" } plugin: Plugin { name: "QGroundControl" }
......
...@@ -2,18 +2,12 @@ ...@@ -2,18 +2,12 @@
QT += location-private positioning-private network QT += location-private positioning-private network
contains(QT_VERSION, 5.5.1) { contains(QT_VERSION, 5.5.1) {
message(Using Local QtLocation headers for Qt 5.5.1) message(Using Local QtLocation headers for Qt 5.5.1)
INCLUDEPATH += \ INCLUDEPATH += \
$$PWD/qtlocation/include \ $$PWD/qtlocation/include \
} else { } else {
message(Using Default QtLocation headers) message(Using Default QtLocation headers)
INCLUDEPATH += $$QT.location.includes INCLUDEPATH += $$QT.location.includes
} }
HEADERS += \ HEADERS += \
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#define QGEOTILEFETCHERQGC_H #define QGEOTILEFETCHERQGC_H
#include <QtLocation/private/qgeotilefetcher_p.h> #include <QtLocation/private/qgeotilefetcher_p.h>
#include <QtLocation/private/qgeotilecache_p.h>
#include "QGCMapUrlEngine.h" #include "QGCMapUrlEngine.h"
class QGeoTiledMappingManagerEngine; class QGeoTiledMappingManagerEngine;
......
...@@ -54,7 +54,13 @@ ...@@ -54,7 +54,13 @@
#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
#include <QtLocation/private/qgeofiletilecache_p.h>
#else
#include <QtLocation/private/qgeotilecache_p.h>
#endif
#endif #endif
#include <QDir> #include <QDir>
#include <QStandardPaths> #include <QStandardPaths>
...@@ -225,7 +231,12 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters) ...@@ -225,7 +231,12 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap &parameters)
if(memLimit < 1024 * 1024) if(memLimit < 1024 * 1024)
memLimit = 1024 * 1024; memLimit = 1024 * 1024;
//-- Disable Qt's disk cache (set memory cache otherwise Qtlocation won't work) //-- 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); QGeoTileCache* pTileCache = createTileCacheWithDir(cacheDir);
#endif
if(pTileCache) if(pTileCache)
{ {
//-- We're basically telling it to use 100k of disk for cache. It doesn't like //-- We're basically telling it to use 100k of disk for cache. It doesn't like
......
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