From 7b922a1f72f78dbe4472066a0c9ccf3f658b4202 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 9 Jul 2017 18:23:16 -0700 Subject: [PATCH] QML UI: actually write libdc logfile Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index a4fe21dab..688c97ba5 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -92,6 +92,8 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), m_lastDevicePixelRatio = qApp->devicePixelRatio(); connect(qobject_cast(QApplication::instance()), &QApplication::applicationStateChanged, this, &QMLManager::applicationStateChanged); + QString libdcLogFileName = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).first() + "/libdivecomputer.log"; + logfile_name = strdup(libdcLogFileName.toUtf8().data()); #if defined(Q_OS_ANDROID) appLogFileName = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).first() + "/subsurface.log"; appLogFile.setFileName(appLogFileName); @@ -1553,6 +1555,7 @@ bool QMLManager::libdcLog() const void QMLManager::setLibdcLog(bool value) { m_libdcLog = value; + DCDeviceData::instance()->setSaveLog(value); emit libdcLogChanged(); }