UI: Logger: Is Portable info

This commit is contained in:
Nodir Temirkhodjaev 2024-10-18 14:15:30 +05:00
parent c4cb2a3cb9
commit f084565cc1
3 changed files with 6 additions and 0 deletions

View File

@ -205,6 +205,7 @@ void FortManager::setupLogger()
const auto settings = IoC<FortSettings>(); const auto settings = IoC<FortSettings>();
logger->setIsPortable(settings->isPortable());
logger->setIsService(settings->isService()); logger->setIsService(settings->isService());
logger->setHasService(settings->hasService()); logger->setHasService(settings->hasService());
logger->setPath(settings->logsPath()); logger->setPath(settings->logsPath());

View File

@ -113,6 +113,7 @@ void Logger::setPath(const QString &path)
QString Logger::getFileTitle() const QString Logger::getFileTitle() const
{ {
return QLatin1String(APP_NAME) + ' ' + APP_VERSION_STR + APP_VERSION_BUILD_STR return QLatin1String(APP_NAME) + ' ' + APP_VERSION_STR + APP_VERSION_BUILD_STR
+ (isPortable() ? " Portable" : QString())
+ (isService() ? " Service" : (hasService() ? " Client" : QString())); + (isService() ? " Service" : (hasService() ? " Client" : QString()));
} }

View File

@ -15,6 +15,9 @@ public:
enum LogLevel { Info = 0, Warning, Error }; enum LogLevel { Info = 0, Warning, Error };
Q_ENUM(LogLevel) Q_ENUM(LogLevel)
bool isPortable() const { return m_isPortable; }
void setIsPortable(bool v) { m_isPortable = v; }
bool isService() const { return m_isService; } bool isService() const { return m_isService; }
void setIsService(bool v) { m_isService = v; } void setIsService(bool v) { m_isService = v; }
@ -61,6 +64,7 @@ private:
void writeLogLine(const QString &logLine); void writeLogLine(const QString &logLine);
private: private:
bool m_isPortable : 1 = false;
bool m_isService : 1 = false; bool m_isService : 1 = false;
bool m_hasService : 1 = false; bool m_hasService : 1 = false;
bool m_forceDebug : 1 = false; bool m_forceDebug : 1 = false;