From 199b22d0130190f13dbbf45d0453695475ccadc5 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Mon, 15 Jan 2024 23:11:24 +0100 Subject: [PATCH] Remove getPaths() usage from LoggingChannel --- src/singletons/helper/LoggingChannel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/singletons/helper/LoggingChannel.cpp b/src/singletons/helper/LoggingChannel.cpp index c6b36d11e..f3a6fbb79 100644 --- a/src/singletons/helper/LoggingChannel.cpp +++ b/src/singletons/helper/LoggingChannel.cpp @@ -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(); }); }