From a816cfed03b7a02156377c29bd8a77b9c58333db Mon Sep 17 00:00:00 2001 From: Arseniy-Movshev Date: Thu, 8 Jun 2023 14:55:29 +0100 Subject: Move fileNameForDate to a common header file This function shows up in quite a few places so this seems justified. Other functions may get this treatment later --- qmlplugin/stepsDataLoader.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'qmlplugin/stepsDataLoader.cpp') diff --git a/qmlplugin/stepsDataLoader.cpp b/qmlplugin/stepsDataLoader.cpp index 8a281a2..2fbd9f1 100644 --- a/qmlplugin/stepsDataLoader.cpp +++ b/qmlplugin/stepsDataLoader.cpp @@ -13,11 +13,11 @@ #include #include #include -#include #include #include #include "stepsDataLoader.h" +#include "../common.h" StepsDataLoader::StepsDataLoader() : QObject() { @@ -79,8 +79,3 @@ QList StepsDataLoader::getDataForDate(QDate date) { void StepsDataLoader::triggerDaemonRecording() { m_iface->call("triggerRecording"); } - -QString fileNameForDate(QDate date, QString prefix) { - 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