MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / canExit

Method canExit

src/mainwindow.cpp:1436–1456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1434}
1435
1436bool 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
1458void MainWindow::cleanup()
1459{

Callers 1

ExitModOrganizerFunction · 0.80

Calls 4

pauseAllMethod · 0.80
downloadManagerMethod · 0.45

Tested by

no test coverage detected