summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/peakcan
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2016-07-31 10:03:27 +0200
committerAndré Hartmann <aha_1980@gmx.de>2016-08-04 04:55:19 +0000
commit0c63b3a441437a8bc42770d360a6696bbf11cd2d (patch)
tree6438a4bdce6f19de02f611a2ce87b3adace5234e /src/plugins/canbus/peakcan
parentf22af5d595749041e353b9248208ca93355e901c (diff)
CAN: Use qUtf8Printable() instead qPrintable() for warnings
From the qPrintable() help: "Note: qDebug(), qInfo(), qWarning(), qCritical(), qFatal() expect %s arguments to be UTF-8 encoded, while qPrintable() converts to local 8-bit encoding. Therefore qUtf8Printable() should be used for logging strings instead of qPrintable()." Change-Id: I724cc61659dd4f998617eade140b273dca841b35 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus/peakcan')
-rw-r--r--src/plugins/canbus/peakcan/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/canbus/peakcan/main.cpp b/src/plugins/canbus/peakcan/main.cpp
index 94213f1..f3977ab 100644
--- a/src/plugins/canbus/peakcan/main.cpp
+++ b/src/plugins/canbus/peakcan/main.cpp
@@ -55,7 +55,7 @@ public:
{
QString errorReason;
if (!PeakCanBackend::canCreate(&errorReason)) {
- qWarning("%s", qPrintable(errorReason));
+ qWarning("%s", qUtf8Printable(errorReason));
return nullptr;
}