diff --git a/src/ui/fortmanager.cpp b/src/ui/fortmanager.cpp index d2ef767a..d42afd43 100644 --- a/src/ui/fortmanager.cpp +++ b/src/ui/fortmanager.cpp @@ -205,6 +205,7 @@ void FortManager::setupLogger() const auto settings = IoC(); + logger->setIsPortable(settings->isPortable()); logger->setIsService(settings->isService()); logger->setHasService(settings->hasService()); logger->setPath(settings->logsPath()); diff --git a/src/ui/manager/logger.cpp b/src/ui/manager/logger.cpp index 91fc0dd4..f5ff596a 100644 --- a/src/ui/manager/logger.cpp +++ b/src/ui/manager/logger.cpp @@ -113,6 +113,7 @@ void Logger::setPath(const QString &path) QString Logger::getFileTitle() const { return QLatin1String(APP_NAME) + ' ' + APP_VERSION_STR + APP_VERSION_BUILD_STR + + (isPortable() ? " Portable" : QString()) + (isService() ? " Service" : (hasService() ? " Client" : QString())); } diff --git a/src/ui/manager/logger.h b/src/ui/manager/logger.h index 42f7a40d..c600120b 100644 --- a/src/ui/manager/logger.h +++ b/src/ui/manager/logger.h @@ -15,6 +15,9 @@ public: enum LogLevel { Info = 0, Warning, Error }; Q_ENUM(LogLevel) + bool isPortable() const { return m_isPortable; } + void setIsPortable(bool v) { m_isPortable = v; } + bool isService() const { return m_isService; } void setIsService(bool v) { m_isService = v; } @@ -61,6 +64,7 @@ private: void writeLogLine(const QString &logLine); private: + bool m_isPortable : 1 = false; bool m_isService : 1 = false; bool m_hasService : 1 = false; bool m_forceDebug : 1 = false;