mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Use qUtf8Printable() for logging strings
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().
This commit is contained in:
@@ -136,7 +136,7 @@ void PowerManagementInhibitor::OnAsyncReply(QDBusPendingCallWatcher *call)
|
||||
|
||||
if (reply.isError())
|
||||
{
|
||||
qDebug("D-Bus: Reply: Error: %s", qPrintable(reply.error().message()));
|
||||
qDebug("D-Bus: Reply: Error: %s", qUtf8Printable(reply.error().message()));
|
||||
m_state = error;
|
||||
}
|
||||
else
|
||||
@@ -152,7 +152,7 @@ void PowerManagementInhibitor::OnAsyncReply(QDBusPendingCallWatcher *call)
|
||||
|
||||
if (reply.isError())
|
||||
{
|
||||
qDebug("D-Bus: Reply: Error: %s", qPrintable(reply.error().message()));
|
||||
qDebug("D-Bus: Reply: Error: %s", qUtf8Printable(reply.error().message()));
|
||||
|
||||
if (!m_use_gsm)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user