aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2018-08-13 03:20:24 +0200
committerDaniel d'Andrada <daniel.dandrada@luxoft.com>2018-08-23 14:01:55 +0000
commitb09e2655f8ee7a0ad38b77ec47d0ba27dd26d8d6 (patch)
tree8c126fd9217a5b06ad79067952ba3e2928f22604
parentb9754de10e8640fb0e528e18bc7336c20ceb99a1 (diff)
Add support for building for iOS
This patch is just for getting Neptune3 compiled - packaging it correctly for installation on an iOS device is still WIP and will be implemented in a later patch. Change-Id: I4cfa6a0c4c85868ec95b04bc4e2279bd5218ac71 Reviewed-by: Daniel d'Andrada <daniel.dandrada@luxoft.com>
-rw-r--r--neptune3-ui.pro2
-rw-r--r--plugins/systeminfo/systeminfo.cpp4
-rw-r--r--plugins/systeminfo/systeminfo.h4
-rw-r--r--src/neptune3-ui/main.cpp6
-rw-r--r--src/remotesettings/remotesettings.pro13
5 files changed, 16 insertions, 13 deletions
diff --git a/neptune3-ui.pro b/neptune3-ui.pro
index 0b051122..805ea772 100644
--- a/neptune3-ui.pro
+++ b/neptune3-ui.pro
@@ -1,4 +1,4 @@
-requires(linux|win32:!winrt|macos)
+requires(linux|android|macos|ios|win32:!winrt)
TEMPLATE = subdirs
diff --git a/plugins/systeminfo/systeminfo.cpp b/plugins/systeminfo/systeminfo.cpp
index c3ace6a1..34e3e178 100644
--- a/plugins/systeminfo/systeminfo.cpp
+++ b/plugins/systeminfo/systeminfo.cpp
@@ -51,7 +51,9 @@ SystemInfo::SystemInfo(QObject *parent)
SystemInfo::~SystemInfo()
{
killTimer(m_timerId);
+#if QT_CONFIG(process)
delete m_diagProc;
+#endif
}
void SystemInfo::init()
@@ -100,6 +102,7 @@ void SystemInfo::getQtDiagInfo()
return;
}
+#if QT_CONFIG(process)
m_diagProc = new QProcess;
connect(m_diagProc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this,
[this, qtdiagExe](int, QProcess::ExitStatus exitStatus) {
@@ -113,6 +116,7 @@ void SystemInfo::getQtDiagInfo()
emit qtDiagChanged();
});
m_diagProc->start(qtdiagExe, QProcess::ReadOnly);
+#endif
}
void SystemInfo::timerEvent(QTimerEvent *event)
diff --git a/plugins/systeminfo/systeminfo.h b/plugins/systeminfo/systeminfo.h
index 25b60357..d591782b 100644
--- a/plugins/systeminfo/systeminfo.h
+++ b/plugins/systeminfo/systeminfo.h
@@ -87,8 +87,10 @@ private:
int m_timerId;
bool m_online{false};
QString m_qtDiagContents;
- QProcess *m_diagProc{nullptr};
QNetworkAccessManager *m_networkManager = nullptr;
+#if QT_CONFIG(process)
+ QProcess *m_diagProc{nullptr};
+#endif
};
#endif // SYSTEMINFO_H
diff --git a/src/neptune3-ui/main.cpp b/src/neptune3-ui/main.cpp
index e49133c4..9fbaee31 100644
--- a/src/neptune3-ui/main.cpp
+++ b/src/neptune3-ui/main.cpp
@@ -61,6 +61,7 @@ QT_USE_NAMESPACE_AM
#define STR(macro) QUOTE(macro)
void startRemoteSettingsServer(const QString &argv) {
+#if QT_CONFIG(process)
QFileInfo fi(argv);
QProcess *serverProcess = new QProcess(qApp);
QObject::connect(serverProcess, &QProcess::stateChanged, [serverProcess] (QProcess::ProcessState state) {
@@ -72,6 +73,7 @@ void startRemoteSettingsServer(const QString &argv) {
serverProcess->terminate();
});
serverProcess->start(QStringLiteral("%1/RemoteSettingsServer").arg(fi.canonicalPath()), QProcess::ReadOnly);
+#endif
}
Q_DECL_EXPORT int main(int argc, char *argv[])
@@ -96,10 +98,10 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
qputenv("QTIVIMEDIA_SIMULATOR_DATABASE", QFile::encodeName(QDir::homePath() + "/media.db"));
qputenv("QT_IM_MODULE", "qtvirtualkeyboard");
-#ifdef Q_OS_ANDROID
+#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
Q_UNUSED(argc)
char arg1[] = "--recreate-database";
- char *_argv[] = {argv[0], arg1, NULL};
+ char *_argv[] = { argv[0], arg1, nullptr };
int _argc = 2;
Main a(_argc, &_argv[0]);
#else
diff --git a/src/remotesettings/remotesettings.pro b/src/remotesettings/remotesettings.pro
index 6c9d447f..e2bead6d 100644
--- a/src/remotesettings/remotesettings.pro
+++ b/src/remotesettings/remotesettings.pro
@@ -1,18 +1,13 @@
TEMPLATE = subdirs
-android: {
+
SUBDIRS += \
frontend \
backend \
qml_plugin \
-}
-else: {
-SUBDIRS += \
- frontend \
- backend \
+
+!android:!ios:SUBDIRS += \
server \
- qml_plugin \
- app
-}
+ app \
backend.depends = frontend
server.depends = frontend