Revise 'Add trackers' dialog

* Now it allow user to add tracker to different tier.
* The downloaded trackers are now displayed as is (without modifying).
* Now the dialog remember dialog size and last used URL.

Closes #17692.
This commit is contained in:
Chocobo1 2022-09-12 23:29:09 +08:00
parent 4e326229da
commit e692a191ed
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
12 changed files with 271 additions and 125 deletions

View file

@ -30,10 +30,12 @@
#include <libtorrent/socket.hpp>
#include <QtContainerFwd>
#include <QtGlobal>
#include <QHash>
#include <QMap>
#include <QString>
#include <QStringView>
namespace BitTorrent
{
@ -74,6 +76,8 @@ namespace BitTorrent
QString message {};
};
QVector<TrackerEntry> parseTrackerEntries(QStringView str);
bool operator==(const TrackerEntry &left, const TrackerEntry &right);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
std::size_t qHash(const TrackerEntry &key, std::size_t seed = 0);