mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-29 11:48: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:
@@ -153,7 +153,7 @@ void SearchWidget::fillCatCombobox()
|
||||
std::sort(tmpList.begin(), tmpList.end(), [](const QStrPair &l, const QStrPair &r) { return (QString::localeAwareCompare(l.first, r.first) < 0); });
|
||||
|
||||
foreach (const QStrPair &p, tmpList) {
|
||||
qDebug("Supported category: %s", qPrintable(p.second));
|
||||
qDebug("Supported category: %s", qUtf8Printable(p.second));
|
||||
m_ui->comboCategory->addItem(p.first, QVariant(p.second));
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ void SearchWidget::on_searchButton_clicked()
|
||||
else if (selectedPlugin() == "multi") plugins = m_searchEngine->enabledPlugins();
|
||||
else plugins << selectedPlugin();
|
||||
|
||||
qDebug("Search with category: %s", qPrintable(selectedCategory()));
|
||||
qDebug("Search with category: %s", qUtf8Printable(selectedCategory()));
|
||||
|
||||
// Update SearchEngine widgets
|
||||
m_noSearchResults = true;
|
||||
|
||||
Reference in New Issue
Block a user