From 580f53c0fd69468f5867a2e4c8bb80b031540643 Mon Sep 17 00:00:00 2001 From: Arseniy-Movshev Date: Sun, 28 May 2023 14:36:42 +0100 Subject: Make the log path configurable This also renames it to sensorlogd from the obsolete asteroid-healthtracker and hides it by default --- qmlplugin/loggerSettings.cpp | 1 - qmlplugin/stepsDataLoader.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'qmlplugin') diff --git a/qmlplugin/loggerSettings.cpp b/qmlplugin/loggerSettings.cpp index c03c3c9..58bd4b9 100644 --- a/qmlplugin/loggerSettings.cpp +++ b/qmlplugin/loggerSettings.cpp @@ -9,7 +9,6 @@ */ #include -#include #include "loggerSettings.h" diff --git a/qmlplugin/stepsDataLoader.cpp b/qmlplugin/stepsDataLoader.cpp index cf072c3..0c084ea 100644 --- a/qmlplugin/stepsDataLoader.cpp +++ b/qmlplugin/stepsDataLoader.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "stepsDataLoader.h" @@ -45,5 +46,6 @@ int StepsDataLoader::getDataForDate(QDate date) { // This is obvious garbage. Th } QString fileNameForDate(QDate date, QString prefix) { - return QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/asteroid-healthloggerd/" + prefix + "/" + date.toString("yyyy-MM-dd.log"); + QSettings settings("asteroid","sensorlogd"); //this should be moved out of here at some point TODO + return settings.value("loggerRootPath",QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.asteroid-sensorlogd/").toString() + prefix + "/" + date.toString("yyyy-MM-dd.log"); } -- cgit v1.2.3-54-g00ecf