aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-05-21 10:18:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-21 07:57:14 -0700
commit997251d43a3db101fce47212ed3bd4f80b7fe7e8 (patch)
tree36d226345cd2e7d2a9b08e1ed7fa17d46d7d6891
parent571965ec6d9a26a543760b8470b093270dd08fbe (diff)
downloadsubsurface-997251d43a3db101fce47212ed3bd4f80b7fe7e8.tar.gz
iOS: store libdivecomputer.log in documents (same dir as app log)
Make location of subsurface.log and libdivecomputer.log consistent Signed-off-by: Jan Iversen <jani@apache.org>
-rw-r--r--mobile-widgets/qmlmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 1e7bd0f83..c92aa869f 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -144,15 +144,16 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
timer.start();
connect(qobject_cast<QApplication *>(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged);
- QString libdcLogFileName = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).first() + "/libdivecomputer.log";
- logfile_name = copy_qstring(libdcLogFileName);
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
#if defined(Q_OS_ANDROID)
appLogFileName = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).first() + "/subsurface.log";
+ QString libdcLogFileName = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).first() + "/libdivecomputer.log";
#elif defined(Q_OS_IOS)
// on iOS we should save the data to the DocumentsLocation so it becomes accessible to the user
appLogFileName = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first() + "/subsurface.log";
+ QString libdcLogFileName = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first() + "/libdivecomputer.log";
#endif
+ logfile_name = copy_qstring(libdcLogFileName);
appLogFile.setFileName(appLogFileName);
if (!appLogFile.open(QIODevice::ReadWrite|QIODevice::Truncate)) {
appLogFileOpen = false;