From 92720131035a86bf06a29d35ebccd980c0178e6b Mon Sep 17 00:00:00 2001 From: Tannin Date: Sat, 17 Aug 2013 08:54:09 +0200 Subject: - bugfix: download manager will now properly pause all downloads on exiting the application - bugfix: resumed downloads now get their automatic-retry-count reset - fiddled with condition tests in fomod (not sure if it works right now) --- src/mainwindow.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 99b37feb..bf6c89c6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -710,12 +710,15 @@ void MainWindow::showEvent(QShowEvent *event) void MainWindow::closeEvent(QCloseEvent* event) { - if (m_DownloadManager.downloadsInProgress() && - QMessageBox::question(this, tr("Downloads in progress"), + if (m_DownloadManager.downloadsInProgress()) { + if (QMessageBox::question(this, tr("Downloads in progress"), tr("There are still downloads in progress, do you really want to quit?"), QMessageBox::Yes | QMessageBox::Cancel) == QMessageBox::Cancel) { - event->ignore(); - return; + event->ignore(); + return; + } else { + m_DownloadManager.pauseAll(); + } } setCursor(Qt::WaitCursor); -- cgit v1.3.1