mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
- Reverted a previous commit. Transfer lists refreshers aren't in separate threads anymore: too buggy
This commit is contained in:
@@ -26,13 +26,9 @@
|
||||
#include "FinishedListDelegate.h"
|
||||
#include <libtorrent/torrent_handle.hpp>
|
||||
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
|
||||
class QStandardItemModel;
|
||||
class bittorrent;
|
||||
class FinishedListDelegate;
|
||||
class FinishedListRefresher;
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
@@ -45,8 +41,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding{
|
||||
QStringList finishedSHAs;
|
||||
QStandardItemModel *finishedListModel;
|
||||
unsigned int nbFinished;
|
||||
FinishedListRefresher *refresher;
|
||||
QMutex finishedListAccess;
|
||||
|
||||
public:
|
||||
FinishedTorrents(QObject *parent, bittorrent *BTSession);
|
||||
@@ -80,27 +74,4 @@ class FinishedTorrents : public QWidget, public Ui::seeding{
|
||||
|
||||
};
|
||||
|
||||
class FinishedListRefresher : public QThread {
|
||||
private:
|
||||
FinishedTorrents* parent;
|
||||
bool abort;
|
||||
public:
|
||||
FinishedListRefresher(FinishedTorrents* parent){
|
||||
this->parent = parent;
|
||||
abort = false;
|
||||
}
|
||||
~FinishedListRefresher(){
|
||||
abort = true;
|
||||
wait();
|
||||
}
|
||||
protected:
|
||||
void run(){
|
||||
forever{
|
||||
if(abort) return;
|
||||
parent->updateFinishedList();
|
||||
msleep(2000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user