From 3ccc7bf59b1547d6250cdfaa1fce63828869c854 Mon Sep 17 00:00:00 2001 From: Arseniy-Movshev Date: Sun, 23 Jul 2023 00:28:58 +0100 Subject: Moved setupFilePath to common from logger This function may need to be used from qml --- daemon/logger.cpp | 5 ----- daemon/logger.h | 1 - 2 files changed, 6 deletions(-) (limited to 'daemon') diff --git a/daemon/logger.cpp b/daemon/logger.cpp index 7e06c63..3cadf2c 100644 --- a/daemon/logger.cpp +++ b/daemon/logger.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -135,9 +134,5 @@ QStringList fileGetPrevRecord(QString sensorPrefix, QDateTime recordTime) { return line.split(":"); } -void setupFilePath(QString sensorPrefix) { - QSettings settings("asteroid","sensorlogd"); //this should be moved out of here at some point TODO - QDir::root().mkpath(settings.value("loggerRootPath",QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.asteroid-sensorlogd/").toString() + sensorPrefix); -} diff --git a/daemon/logger.h b/daemon/logger.h index c16908d..056645b 100644 --- a/daemon/logger.h +++ b/daemon/logger.h @@ -49,6 +49,5 @@ private: }; bool dayFileExists(QString sensorPrefix, QDateTime date = QDateTime::currentDateTime()); //check if today has a log file for the given sensor QStringList fileGetPrevRecord(QString sensorPrefix, QDateTime recordTime = QDateTime::currentDateTime()); //works backwards to find the last record in today's file before the given time - returns nothing if no file is found. - void setupFilePath(QString sensorPrefix); //sets up the paths for sensors to write into #endif // LOGGER_H -- cgit v1.2.3-54-g00ecf