MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / closeEvent

Method closeEvent

gui/qt/mainwindow.cpp:1380–1418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1378}
1379
1380void MainWindow::closeEvent(QCloseEvent *e) {
1381 guiEmuValid = false;
1382
1383 if (!m_shutdown) {
1384 m_shutdown = true;
1385
1386 com.idClose();
1387
1388 if (!m_initPassed) {
1389 QMainWindow::closeEvent(e);
1390 return;
1391 }
1392
1393 if (guiDebugBasic) {
1394 debugBasic(false);
1395 }
1396
1397 if (guiDebug) {
1398 debugToggle();
1399 }
1400
1401 if (guiReceive) {
1402 varToggle();
1403 }
1404
1405 if (!m_needReload) {
1406 saveSettings();
1407
1408 if (m_config->value(SETTING_SAVE_ON_CLOSE).toBool()) {
1409 stateToPath(m_pathImage);
1410 e->ignore();
1411 return;
1412 }
1413 }
1414 }
1415
1416 emu.stop();
1417 QMainWindow::closeEvent(e);
1418}
1419
1420void MainWindow::console(const QString &str, int type) {
1421 if (m_nativeConsole) {

Callers

nothing calls this directly

Calls 2

idCloseMethod · 0.80
stopMethod · 0.80

Tested by

no test coverage detected