mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Merge pull request #17980 from Chocobo1/model
Reserve space before appending elements
This commit is contained in:
@@ -2908,10 +2908,8 @@ void SessionImpl::generateResumeData()
|
||||
void SessionImpl::saveResumeData()
|
||||
{
|
||||
for (const TorrentImpl *torrent : asConst(m_torrents))
|
||||
{
|
||||
torrent->nativeHandle().save_resume_data(lt::torrent_handle::only_if_modified);
|
||||
++m_numResumeData;
|
||||
}
|
||||
m_numResumeData += m_torrents.size();
|
||||
|
||||
// clear queued storage move jobs except the current ongoing one
|
||||
if (m_moveStorageQueue.size() > 1)
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace
|
||||
// Spoof HTTP Referer to allow adding torrent link from Torcache/KickAssTorrents
|
||||
request.setRawHeader("Referer", request.url().toEncoded().data());
|
||||
#ifdef QT_NO_COMPRESS
|
||||
// The macro "QT_NO_COMPRESS" defined in QT will disable the zlib releated features
|
||||
// The macro "QT_NO_COMPRESS" defined in QT will disable the zlib related features
|
||||
// and reply data auto-decompression in QT will also be disabled. But we can support
|
||||
// gzip encoding and manually decompress the reply data.
|
||||
request.setRawHeader("Accept-Encoding", "gzip");
|
||||
|
||||
Reference in New Issue
Block a user