mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07: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:
parent
219a6b3ad1
commit
cff6a64e9f
28 changed files with 100 additions and 99 deletions
|
@ -1247,7 +1247,7 @@ void MainWindow::dropEvent(QDropEvent *event)
|
|||
// Download torrents
|
||||
const bool useTorrentAdditionDialog = AddNewTorrentDialog::isEnabled();
|
||||
foreach (const QString &file, torrentFiles) {
|
||||
qDebug("Dropped file %s on download list", qPrintable(file));
|
||||
qDebug("Dropped file %s on download list", qUtf8Printable(file));
|
||||
if (useTorrentAdditionDialog)
|
||||
AddNewTorrentDialog::show(file, this);
|
||||
else
|
||||
|
@ -1341,7 +1341,7 @@ void MainWindow::on_actionOpen_triggered()
|
|||
const bool useTorrentAdditionDialog = AddNewTorrentDialog::isEnabled();
|
||||
if (!pathsList.isEmpty()) {
|
||||
foreach (QString file, pathsList) {
|
||||
qDebug("Dropped file %s on download list", qPrintable(file));
|
||||
qDebug("Dropped file %s on download list", qUtf8Printable(file));
|
||||
if (useTorrentAdditionDialog)
|
||||
AddNewTorrentDialog::show(file, this);
|
||||
else
|
||||
|
@ -2027,7 +2027,7 @@ bool MainWindow::addPythonPathToEnv()
|
|||
if (pathEnvar.isNull())
|
||||
pathEnvar = "";
|
||||
pathEnvar = pythonPath + ";" + pathEnvar;
|
||||
qDebug("New PATH envvar is: %s", qPrintable(pathEnvar));
|
||||
qDebug("New PATH envvar is: %s", qUtf8Printable(pathEnvar));
|
||||
qputenv("PATH", Utils::Fs::toNativePath(pathEnvar).toLocal8Bit());
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue