mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 19:57:45 +03:00
Use QString::toStdString()
Qt5 utilized the desired toUtf8() instead of toAscii().
This commit is contained in:
parent
f78bf27daf
commit
cab10aa7b4
1 changed files with 4 additions and 0 deletions
|
@ -177,8 +177,12 @@ QString Utils::String::fromStdString(const std::string &str)
|
||||||
|
|
||||||
std::string Utils::String::toStdString(const QString &str)
|
std::string Utils::String::toStdString(const QString &str)
|
||||||
{
|
{
|
||||||
|
#ifdef QBT_USES_QT5
|
||||||
|
return str.toStdString();
|
||||||
|
#else
|
||||||
QByteArray utf8 = str.toUtf8();
|
QByteArray utf8 = str.toUtf8();
|
||||||
return std::string(utf8.constData(), utf8.length());
|
return std::string(utf8.constData(), utf8.length());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// to send numbers instead of strings with suffixes
|
// to send numbers instead of strings with suffixes
|
||||||
|
|
Loading…
Reference in a new issue