diff options
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 8e7664229..8d4ae6314 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -14,6 +14,7 @@ #include <QTimer> #include <QDateTime> #include <QClipboard> +#include <QFile> #include <QBluetoothLocalDevice> @@ -155,6 +156,9 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false), appLogFileName = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first() + "/subsurface.log"; QString libdcLogFileName = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).first() + "/libdivecomputer.log"; #endif + // remove the existing libdivecomputer logfile so we don't copy an old one by mistake + QFile libdcLog(libdcLogFileName); + libdcLog.remove(); logfile_name = copy_qstring(libdcLogFileName); appLogFile.setFileName(appLogFileName); if (!appLogFile.open(QIODevice::ReadWrite|QIODevice::Truncate)) { |