Use QString literals

This patch covers src/app and src/base folders.
Follow up of ab64ee872b.
This commit is contained in:
Chocobo1
2022-03-04 14:24:14 +08:00
parent ab64ee872b
commit f0dd7b7dae
38 changed files with 771 additions and 764 deletions

View File

@@ -122,7 +122,7 @@ nonstd::expected<TorrentInfo, QString> TorrentInfo::loadFromFile(const Path &pat
}
catch (const std::bad_alloc &e)
{
return nonstd::make_unexpected(tr("Torrent file read error: %1").arg(e.what()));
return nonstd::make_unexpected(tr("Torrent file read error: %1").arg(QString::fromLocal8Bit(e.what())));
}
if (data.size() != file.size())
@@ -294,7 +294,7 @@ QVector<QUrl> TorrentInfo::urlSeeds() const
for (const lt::web_seed_entry &webSeed : nativeWebSeeds)
{
if (webSeed.type == lt::web_seed_entry::url_seed)
urlSeeds.append(QUrl(webSeed.url.c_str()));
urlSeeds.append(QUrl(QString::fromStdString(webSeed.url)));
}
return urlSeeds;