mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -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:
committed by
sledgehammer999
parent
0b6cf54508
commit
8fc931a61b
@@ -155,7 +155,7 @@ void SearchEngine::updatePlugin(const QString &name)
|
||||
// Install or update plugin from file or url
|
||||
void SearchEngine::installPlugin(const QString &source)
|
||||
{
|
||||
qDebug("Asked to install plugin at %s", qPrintable(source));
|
||||
qDebug("Asked to install plugin at %s", qUtf8Printable(source));
|
||||
|
||||
if (Utils::Misc::isUrl(source)) {
|
||||
using namespace Net;
|
||||
@@ -615,7 +615,7 @@ void SearchEngine::parseVersionInfo(const QByteArray &info)
|
||||
|
||||
dataCorrect = true;
|
||||
if (isUpdateNeeded(pluginName, version)) {
|
||||
qDebug("Plugin: %s is outdated", qPrintable(pluginName));
|
||||
qDebug("Plugin: %s is outdated", qUtf8Printable(pluginName));
|
||||
updateInfo[pluginName] = version;
|
||||
}
|
||||
}
|
||||
@@ -662,7 +662,7 @@ PluginVersion SearchEngine::getPluginVersion(QString filePath)
|
||||
{
|
||||
QFile plugin(filePath);
|
||||
if (!plugin.exists()) {
|
||||
qDebug("%s plugin does not exist, returning 0.0", qPrintable(filePath));
|
||||
qDebug("%s plugin does not exist, returning 0.0", qUtf8Printable(filePath));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user