mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -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
@@ -353,7 +353,7 @@ void ScanFoldersModel::configure()
|
||||
void ScanFoldersModel::addTorrentsToSession(const QStringList &pathList)
|
||||
{
|
||||
foreach (const QString &file, pathList) {
|
||||
qDebug("File %s added", qPrintable(file));
|
||||
qDebug("File %s added", qUtf8Printable(file));
|
||||
|
||||
BitTorrent::AddTorrentParams params;
|
||||
if (downloadInWatchFolder(file))
|
||||
@@ -372,7 +372,7 @@ void ScanFoldersModel::addTorrentsToSession(const QStringList &pathList)
|
||||
Utils::Fs::forceRemove(file);
|
||||
}
|
||||
else {
|
||||
qDebug("Failed to open magnet file: %s", qPrintable(f.errorString()));
|
||||
qDebug("Failed to open magnet file: %s", qUtf8Printable(f.errorString()));
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -382,7 +382,7 @@ void ScanFoldersModel::addTorrentsToSession(const QStringList &pathList)
|
||||
Utils::Fs::forceRemove(file);
|
||||
}
|
||||
else {
|
||||
qDebug("Ignoring incomplete torrent file: %s", qPrintable(file));
|
||||
qDebug("Ignoring incomplete torrent file: %s", qUtf8Printable(file));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user