Use QString literals

The plan is to define `QT_NO_CAST_FROM_ASCII` eventually.
PR #16561.
This commit is contained in:
Chocobo1
2022-03-04 13:25:22 +08:00
committed by GitHub
parent 2c8447853b
commit ab64ee872b
23 changed files with 104 additions and 108 deletions

View File

@@ -114,7 +114,7 @@ BitTorrent::BencodeResumeDataStorage::BencodeResumeDataStorage(const Path &path,
m_registeredTorrents.append(TorrentID::fromString(rxMatch.captured(1)));
}
loadQueue(m_resumeDataPath / Path("queue"));
loadQueue(m_resumeDataPath / Path(u"queue"_qs));
qDebug() << "Registered torrents count: " << m_registeredTorrents.size();
@@ -403,7 +403,7 @@ void BitTorrent::BencodeResumeDataStorage::Worker::storeQueue(const QVector<Torr
for (const BitTorrent::TorrentID &torrentID : queue)
data += (torrentID.toString().toLatin1() + '\n');
const Path filepath = m_resumeDataDir / Path("queue");
const Path filepath = m_resumeDataDir / Path(u"queue"_qs);
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(filepath, data);
if (!result)
{