From 5f3729db708676cdced5300258b12d9cf709fe20 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Tue, 11 Jul 2017 23:58:12 -0400 Subject: [PATCH] Enable QtQuick compiler for iOS store builds. Hide "Save Path" as it breaks the UI in General Settings. --- qgroundcontrol.pro | 2 ++ src/api/QGCCorePlugin.cc | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 06ff98ffd..23e4fc75c 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -55,6 +55,8 @@ iOSBuild { count(APP_ERROR, 1) { error("Error building .plist file. 'ForAppStore' builds are only possible through the official build system.") } + QT += qml-private + CONFIG += qtquickcompiler QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOSForAppStore-Info.plist OTHER_FILES += $${BASEDIR}/ios/iOSForAppStore-Info.plist } else { diff --git a/src/api/QGCCorePlugin.cc b/src/api/QGCCorePlugin.cc index f40fe3d92..a427bacad 100644 --- a/src/api/QGCCorePlugin.cc +++ b/src/api/QGCCorePlugin.cc @@ -175,6 +175,13 @@ bool QGCCorePlugin::adjustSettingMetaData(FactMetaData& metaData) #else metaData.setRawDefaultValue(true); return true; +#endif +#if defined(__ios__) + } else if (metaData.name() == AppSettings::savePathName) { + QString appName = qgcApp()->applicationName(); + QDir rootDir = QDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); + metaData.setRawDefaultValue(rootDir.filePath(appName)); + return false; #endif } return true; // Show setting in ui -- 2.22.0