MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / on_windowClose

Method on_windowClose

launcher/Application.cpp:1465–1488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1463}
1464
1465void Application::on_windowClose()
1466{
1467 m_openWindows--;
1468 auto instWindow = qobject_cast<InstanceWindow *>(QObject::sender());
1469 if(instWindow)
1470 {
1471 auto & extras = m_instanceExtras[instWindow->instanceId()];
1472 extras.window = nullptr;
1473 if(extras.controller)
1474 {
1475 extras.controller->setParentWidget(m_mainWindow);
1476 }
1477 }
1478 auto mainWindow = qobject_cast<MainWindow *>(QObject::sender());
1479 if(mainWindow)
1480 {
1481 m_mainWindow = nullptr;
1482 }
1483 // quit when there are no more windows.
1484 if(shouldExitNow())
1485 {
1486 exit(0);
1487 }
1488}
1489
1490void Application::updateProxySettings(QString proxyTypeStr, QString addr, int port, QString user, QString password)
1491{

Callers

nothing calls this directly

Calls 2

instanceIdMethod · 0.80
setParentWidgetMethod · 0.80

Tested by

no test coverage detected