refactor: Un-singletonize Paths & Updates (#5092)

This commit is contained in:
pajlada
2024-01-16 21:56:43 +01:00
committed by GitHub
parent 7f935665f9
commit 718696db53
60 changed files with 237 additions and 165 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
#include "LoggingChannel.hpp"
#include "Application.hpp"
#include "common/QLogging.hpp"
#include "messages/Message.hpp"
#include "messages/MessageThread.hpp"
@@ -44,8 +45,9 @@ LoggingChannel::LoggingChannel(const QString &_channelName,
QDir::separator() + this->subDirectory;
getSettings()->logPath.connect([this](const QString &logPath, auto) {
this->baseDirectory =
logPath.isEmpty() ? getPaths()->messageLogDirectory : logPath;
this->baseDirectory = logPath.isEmpty()
? getIApp()->getPaths().messageLogDirectory
: logPath;
this->openLogFile();
});
}