summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-04-13 16:53:51 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-04-13 17:07:43 -0700
commit0df43252bef7d6aa8733de0c4c3ab8698636dc8e (patch)
tree3dad89e47a70cbe19e6b94aef8c25b9c73b52f09 /mobile-widgets
parent27b921fb1d0c9d5350a9834837465178aa8e819d (diff)
downloadsubsurface-0df43252bef7d6aa8733de0c4c3ab8698636dc8e.tar.gz
iOS: log messages
So far we only wrote messages to subsurface.log on Android (since we couldn't figure out how to make that file user accessible on iOS). Now that that's fixed, we also need to actually write to the file in the first place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qmlmanager.cpp6
-rw-r--r--mobile-widgets/qmlmanager.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 9aaca2f24..c2b2b66fd 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -373,7 +373,7 @@ void QMLManager::finishSetup()
QMLManager::~QMLManager()
{
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
if (appLogFileOpen)
appLogFile.close();
#endif
@@ -1630,7 +1630,7 @@ void QMLManager::setBtEnabled(bool value)
m_btEnabled = value;
}
-#if defined (Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
void writeToAppLogFile(QString logText)
{
@@ -1649,7 +1649,9 @@ void QMLManager::writeToAppLogFile(QString logText)
appLogFile.flush();
}
}
+#endif
+#if defined(Q_OS_ANDROID)
//HACK to color the system bar on Android, use qtandroidextras and call the appropriate Java methods
//this code is based on code in the Kirigami example app for Android (under LGPL-2) Copyright 2017 Marco Martin
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h
index 01c56cae4..dd3d48dff 100644
--- a/mobile-widgets/qmlmanager.h
+++ b/mobile-widgets/qmlmanager.h
@@ -143,7 +143,7 @@ public:
Q_INVOKABLE void setStatusbarColor(QColor color);
void btHostModeChange(QBluetoothLocalDevice::HostMode state);
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
void writeToAppLogFile(QString logText);
#endif