Browse Source

Avoid string encoding conversion

Use UTF-16 string literals to match QTextStream internal buffer
encoding.
adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
fed969ed64
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 10
      src/app/filelogger.cpp

10
src/app/filelogger.cpp

@ -134,19 +134,19 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
switch (msg.type) switch (msg.type)
{ {
case Log::INFO: case Log::INFO:
stream << "(I) "; stream << u"(I) ";
break; break;
case Log::WARNING: case Log::WARNING:
stream << "(W) "; stream << u"(W) ";
break; break;
case Log::CRITICAL: case Log::CRITICAL:
stream << "(C) "; stream << u"(C) ";
break; break;
default: default:
stream << "(N) "; stream << u"(N) ";
} }
stream << QDateTime::fromMSecsSinceEpoch(msg.timestamp).toString(Qt::ISODate) << " - " << msg.message << '\n'; stream << QDateTime::fromMSecsSinceEpoch(msg.timestamp).toString(Qt::ISODate) << u" - " << msg.message << u'\n';
if (m_backup && (m_logFile.size() >= m_maxSize)) if (m_backup && (m_logFile.size() >= m_maxSize))
{ {

Loading…
Cancel
Save