- Reverted a previous commit. Transfer lists refreshers aren't in separate threads anymore: too buggy

This commit is contained in:
Christophe Dumez
2007-07-25 14:14:38 +00:00
parent 95fc9e3a72
commit 4e4b0ed9ff
6 changed files with 13 additions and 99 deletions

View File

@@ -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