Improve tracker entries handling

PR #19468.

* Use QHash to map tracker endpoints
* Don't clear numPeers unexpectedly
* Remove outdated tracker entry endpoints
* Move presentation logic from Core to GUI code
* Show all endpoints per tracker in tree structure

---------

Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Vladimir Golovnev
2023-08-21 10:27:19 +03:00
committed by GitHub
parent 34d30ed031
commit c805606524
8 changed files with 176 additions and 91 deletions

View File

@@ -264,7 +264,7 @@ namespace BitTorrent
void saveResumeData(lt::resume_data_flags_t flags = {});
void handleMoveStorageJobFinished(const Path &path, MoveStorageContext context, bool hasOutstandingJob);
void fileSearchFinished(const Path &savePath, const PathList &fileNames);
TrackerEntry updateTrackerEntry(const lt::announce_entry &announceEntry, const QMap<TrackerEntry::Endpoint, int> &updateInfo);
TrackerEntry updateTrackerEntry(const lt::announce_entry &announceEntry, const QHash<TrackerEntry::Endpoint, int> &updateInfo);
private:
using EventTrigger = std::function<void ()>;