Use QList explicitly

PR #21016.
This commit is contained in:
Vladimir Golovnev
2024-07-04 08:30:39 +03:00
committed by GitHub
parent d2fceaa228
commit 5ef2a1df07
95 changed files with 408 additions and 373 deletions

View File

@@ -204,9 +204,9 @@ void BitTorrent::TorrentDescriptor::setTorrentInfo(TorrentInfo torrentInfo)
}
}
QVector<BitTorrent::TrackerEntry> BitTorrent::TorrentDescriptor::trackers() const
QList<BitTorrent::TrackerEntry> BitTorrent::TorrentDescriptor::trackers() const
{
QVector<TrackerEntry> ret;
QList<TrackerEntry> ret;
ret.reserve(static_cast<decltype(ret)::size_type>(m_ltAddTorrentParams.trackers.size()));
std::size_t i = 0;
for (const std::string &tracker : m_ltAddTorrentParams.trackers)
@@ -215,9 +215,9 @@ QVector<BitTorrent::TrackerEntry> BitTorrent::TorrentDescriptor::trackers() cons
return ret;
}
QVector<QUrl> BitTorrent::TorrentDescriptor::urlSeeds() const
QList<QUrl> BitTorrent::TorrentDescriptor::urlSeeds() const
{
QVector<QUrl> urlSeeds;
QList<QUrl> urlSeeds;
urlSeeds.reserve(static_cast<decltype(urlSeeds)::size_type>(m_ltAddTorrentParams.url_seeds.size()));
for (const std::string &nativeURLSeed : m_ltAddTorrentParams.url_seeds)