|
|
|
@ -234,9 +234,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
@@ -234,9 +234,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|
|
|
|
setWindowState(Qt::WindowMinimized); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
scrapeTimer = new QTimer(this); |
|
|
|
|
connect(scrapeTimer, SIGNAL(timeout()), this, SLOT(scrapeTrackers())); |
|
|
|
|
scrapeTimer->start(20000); |
|
|
|
|
qDebug("GUI Built"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -244,12 +241,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
@@ -244,12 +241,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|
|
|
|
GUI::~GUI() { |
|
|
|
|
qDebug("GUI destruction"); |
|
|
|
|
hide(); |
|
|
|
|
// Do this as soon as possible
|
|
|
|
|
BTSession->saveDHTEntry(); |
|
|
|
|
BTSession->saveSessionState(); |
|
|
|
|
BTSession->saveFastResumeData(); |
|
|
|
|
scrapeTimer->stop(); |
|
|
|
|
delete scrapeTimer; |
|
|
|
|
delete dlSpeedLbl; |
|
|
|
|
delete upSpeedLbl; |
|
|
|
|
delete ratioLbl; |
|
|
|
@ -310,16 +301,6 @@ void GUI::displayRSSTab(bool enable) {
@@ -310,16 +301,6 @@ void GUI::displayRSSTab(bool enable) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GUI::scrapeTrackers() { |
|
|
|
|
std::vector<torrent_handle> torrents = BTSession->getTorrents(); |
|
|
|
|
std::vector<torrent_handle>::iterator torrentIT; |
|
|
|
|
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) { |
|
|
|
|
QTorrentHandle h = QTorrentHandle(*torrentIT); |
|
|
|
|
if(!h.is_valid()) continue; |
|
|
|
|
h.scrape_tracker(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GUI::updateRatio() { |
|
|
|
|
// Update ratio info
|
|
|
|
|
float ratio = 1.; |
|
|
|
|