mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
- Update trackers edition code
- current tracker is now updated regularly when properties are displayed
This commit is contained in:
10
src/misc.h
10
src/misc.h
@@ -31,6 +31,9 @@
|
||||
#include <QPair>
|
||||
#include <QThread>
|
||||
|
||||
#include <libtorrent/torrent_info.hpp>
|
||||
using namespace libtorrent;
|
||||
|
||||
#define MAX_CHAR_TMP 128
|
||||
|
||||
/* Miscellaneaous functions that can be useful */
|
||||
@@ -144,6 +147,13 @@ class misc : public QObject{
|
||||
return QString();
|
||||
}
|
||||
|
||||
static void fixTrackersTiers(std::vector<announce_entry> trackers){
|
||||
unsigned int nbTrackers = trackers.size();
|
||||
for(unsigned int i=0; i<nbTrackers; ++i){
|
||||
trackers[i].tier = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Insertion sort, used instead of bubble sort because it is
|
||||
// approx. 5 times faster.
|
||||
template <class T> static void insertSort(QList<QPair<int, T> > &list, const QPair<int, T>& value, Qt::SortOrder sortOrder){
|
||||
|
||||
Reference in New Issue
Block a user