|
|
|
@ -143,6 +143,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
@@ -143,6 +143,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|
|
|
|
connect(BTSession, SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString))); |
|
|
|
|
connect(BTSession, SIGNAL(downloadFromUrlFailure(QString, QString)), this, SLOT(handleDownloadFromUrlFailure(QString, QString))); |
|
|
|
|
connect(BTSession, SIGNAL(deletedTorrent(QString)), this, SLOT(deleteTorrent(QString))); |
|
|
|
|
connect(BTSession, SIGNAL(torrentPaused(QTorrentHandle&)), this, SLOT(setPaused(QTorrentHandle&))); |
|
|
|
|
qDebug("create tabWidget"); |
|
|
|
|
tabs = new QTabWidget(); |
|
|
|
|
// Download torrents tab
|
|
|
|
@ -443,14 +444,20 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
@@ -443,14 +444,20 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|
|
|
|
// Download will be paused by libtorrent. Updating GUI information accordingly
|
|
|
|
|
QString hash = h.hash(); |
|
|
|
|
qDebug("Full disk error, pausing torrent %s", hash.toLocal8Bit().data()); |
|
|
|
|
setPaused(h); |
|
|
|
|
BTSession->addConsoleMessage(tr("An error occured (full disk?), '%1' paused.", "e.g: An error occured (full disk?), 'xxx.avi' paused.").arg(h.name())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GUI::setPaused(QTorrentHandle &h) const { |
|
|
|
|
Q_ASSERT(h.is_paused()); |
|
|
|
|
qDebug("Marking torrent %s as paused", h.hash().toUtf8().data()); |
|
|
|
|
if(h.is_seed()) { |
|
|
|
|
// In finished list
|
|
|
|
|
qDebug("Automatically paused torrent was in finished list"); |
|
|
|
|
finishedTorrentTab->pauseTorrent(hash); |
|
|
|
|
finishedTorrentTab->pauseTorrent(h.hash()); |
|
|
|
|
}else{ |
|
|
|
|
downloadingTorrentTab->pauseTorrent(hash); |
|
|
|
|
downloadingTorrentTab->pauseTorrent(h.hash()); |
|
|
|
|
} |
|
|
|
|
BTSession->addConsoleMessage(tr("An error occured (full disk?), '%1' paused.", "e.g: An error occured (full disk?), 'xxx.avi' paused.").arg(h.name())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void GUI::createKeyboardShortcuts() { |
|
|
|
@ -1630,3 +1637,4 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
@@ -1630,3 +1637,4 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|
|
|
|
downloadFromURL *downloadFromURLDialog = new downloadFromURL(this); |
|
|
|
|
connect(downloadFromURLDialog, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), BTSession, SLOT(downloadFromURLList(const QStringList&))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|