summaryrefslogtreecommitdiffstats
path: root/src/libraries/qmfclient/support/qlogsystem.cpp
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.vuorela@jolla.com>2018-08-15 14:19:02 +0300
committerPekka Vuorela <pvuorela@iki.fi>2018-08-30 11:15:12 +0000
commit764f6e92a7d0837db67efa5374473224c0d178f8 (patch)
treec24b7079f69e0fea561dc070b028f8bd0b0d6cb2 /src/libraries/qmfclient/support/qlogsystem.cpp
parent0d05972b955178184e520c8d86659cbbc4552606 (diff)
Fix hundreds of compiler warnings on ascii strings
Like earlier fixes, mostly adding QLatin1String everywhere. Occasionally QStringLiteral, QByteArray or QString/QChar::fromLatin1 or something similar. Still warnings left, but rest might need more work than latin1 wrapping. Change-Id: I0fb2fc74e56e497342a78d9497370db6a7f2b169 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com>
Diffstat (limited to 'src/libraries/qmfclient/support/qlogsystem.cpp')
-rw-r--r--src/libraries/qmfclient/support/qlogsystem.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libraries/qmfclient/support/qlogsystem.cpp b/src/libraries/qmfclient/support/qlogsystem.cpp
index 80d23ac3..c7b7533e 100644
--- a/src/libraries/qmfclient/support/qlogsystem.cpp
+++ b/src/libraries/qmfclient/support/qlogsystem.cpp
@@ -127,11 +127,11 @@ const QString& NoLogPrefix::operator()(const LogLevel& lvl)
LvlLogPrefix::LvlLogPrefix()
{
- levels_str[LlDbg] = QString("[Debug] ");
- levels_str[LlInfo] = QString("[Info] ");
- levels_str[LlWarning] = QString("[Warning] ");
- levels_str[LlError] = QString("[Error] ");
- levels_str[LlCritical] = QString("[Critical] ");
+ levels_str[LlDbg] = QLatin1String("[Debug] ");
+ levels_str[LlInfo] = QLatin1String("[Info] ");
+ levels_str[LlWarning] = QLatin1String("[Warning] ");
+ levels_str[LlError] = QLatin1String("[Error] ");
+ levels_str[LlCritical] = QLatin1String("[Critical] ");
}
const QString& LvlLogPrefix::operator()(const LogLevel& lvl)
@@ -142,14 +142,14 @@ const QString& LvlLogPrefix::operator()(const LogLevel& lvl)
const QString& LvlTimeLogPrefix::operator()(const LogLevel& lvl)
{
- out = QDateTime::currentDateTime().toString ("MMM dd hh:mm:ss ") + LvlLogPrefix::operator()(lvl);
+ out = QDateTime::currentDateTime().toString(QLatin1String("MMM dd hh:mm:ss ")) + LvlLogPrefix::operator()(lvl);
return out;
}
LvlTimePidLogPrefix::LvlTimePidLogPrefix()
{
#ifndef Q_OS_WIN
- stPid = QString("[%1] ").arg(getpid());
+ stPid = QString::fromLatin1("[%1] ").arg(getpid());
#else
stPid = QString("[%1] ").arg(qApp->applicationPid());
#endif