| 1434 | } |
| 1435 | |
| 1436 | bool MainWindow::canExit() |
| 1437 | { |
| 1438 | if (m_OrganizerCore.downloadManager()->downloadsInProgressNoPause()) { |
| 1439 | if (QMessageBox::question( |
| 1440 | this, tr("Downloads in progress"), |
| 1441 | tr("There are still downloads in progress, do you really want to quit?"), |
| 1442 | QMessageBox::Yes | QMessageBox::Cancel) == QMessageBox::Cancel) { |
| 1443 | return false; |
| 1444 | } else { |
| 1445 | m_OrganizerCore.downloadManager()->pauseAll(); |
| 1446 | } |
| 1447 | } |
| 1448 | |
| 1449 | const auto r = m_OrganizerCore.waitForAllUSVFSProcesses(); |
| 1450 | if (r == ProcessRunner::Cancelled) { |
| 1451 | return false; |
| 1452 | } |
| 1453 | |
| 1454 | setCursor(Qt::WaitCursor); |
| 1455 | return true; |
| 1456 | } |
| 1457 | |
| 1458 | void MainWindow::cleanup() |
| 1459 | { |
no test coverage detected