Make TorrentInfo immutable

This commit is contained in:
Vladimir Golovnev (Glassez)
2021-12-09 13:05:49 +03:00
parent 9d2bb67834
commit 62b50d1475
22 changed files with 382 additions and 255 deletions

View File

@@ -289,6 +289,7 @@ namespace BitTorrent
lt::torrent_status m_nativeStatus;
TorrentState m_state = TorrentState::Unknown;
TorrentInfo m_torrentInfo;
QStringList m_filePaths;
SpeedMonitor m_speedMonitor;
InfoHash m_infoHash;
@@ -301,12 +302,6 @@ namespace BitTorrent
MaintenanceJob m_maintenanceJob = MaintenanceJob::None;
#ifndef QBT_USES_LIBTORRENT2
// Until libtorrent provided an "old_name" field in `file_renamed_alert`
// we relied on this workaround to remove empty leftover folders
QHash<int, QVector<QString>> m_oldPath;
#endif
QHash<QString, QMap<lt::tcp::endpoint, int>> m_trackerPeerCounts;
FileErrorInfo m_lastFileError;