Fix log file Dir

This commit is contained in:
Simon De Backer
2020-08-15 21:40:07 +02:00
parent dff825810c
commit 5832e365e9

View File

@@ -109,8 +109,8 @@ void myMessageOutput(QtMsgType type,
txt+= context.function ? context.function : ""; txt+= context.function ? context.function : "";
txt+=")\n"; txt+=")\n";
} }
QFile outFile(QDir::homePath() QFile outFile(QETApp::configDir()
+"/.qet/" +"/"
+QDate::currentDate().toString("yyyyMMdd") +QDate::currentDate().toString("yyyyMMdd")
+".log"); +".log");
if(outFile.open(QIODevice::WriteOnly | QIODevice::Append)) if(outFile.open(QIODevice::WriteOnly | QIODevice::Append))
@@ -129,7 +129,7 @@ void myMessageOutput(QtMsgType type,
void delete_old_log_files(int days) void delete_old_log_files(int days)
{ {
const QDate today = QDate::currentDate(); const QDate today = QDate::currentDate();
const QString path = QDir::homePath() + "/.qet/"; const QString path = QETApp::configDir() + "/";
QString filter("%1%1%1%1%1%1%1%1.log"); // pattern QString filter("%1%1%1%1%1%1%1%1.log"); // pattern
filter = filter.arg("[0123456789]"); // valid characters filter = filter.arg("[0123456789]"); // valid characters