summaryrefslogtreecommitdiff
path: root/qmlplugin/stepsDataLoader.cpp
diff options
context:
space:
mode:
authorArseniy-Movshev <dodoradio@outlook.com>2023-06-08 14:55:29 +0100
committerArseniy-Movshev <dodoradio@outlook.com>2023-06-20 00:05:28 +0100
commita816cfed03b7a02156377c29bd8a77b9c58333db (patch)
tree4b0d3db87240d94441c493de163a09eff743da2a /qmlplugin/stepsDataLoader.cpp
parent6087e0b0dd7a5246aca9024ef777b62080d35834 (diff)
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
Diffstat (limited to 'qmlplugin/stepsDataLoader.cpp')
-rw-r--r--qmlplugin/stepsDataLoader.cpp7
1 files changed, 1 insertions, 6 deletions
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 <QTextStream>
#include <QDate>
#include <QSettings>
-#include <QStandardPaths>
#include <QDBusInterface>
#include <QPointF>
#include "stepsDataLoader.h"
+#include "../common.h"
StepsDataLoader::StepsDataLoader() : QObject()
{
@@ -79,8 +79,3 @@ QList<QPointF> 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");
-}