Main window: handle window closing correctly

pull/398/head
f4exb 2019-07-22 18:49:24 +02:00
rodzic a6a6a078f5
commit 0af803551a
2 zmienionych plików z 12 dodań i 13 usunięć

Wyświetl plik

@ -812,8 +812,19 @@ void MainWindow::createStatusBar()
statusBar()->addPermanentWidget(m_dateTimeWidget);
}
void MainWindow::closeEvent(QCloseEvent*)
void MainWindow::closeEvent(QCloseEvent *closeEvent)
{
qDebug("MainWindow::closeEvent");
savePresetSettings(m_settings.getWorkingPreset(), 0);
m_settings.save();
while (m_deviceUIs.size() > 0)
{
removeLastDevice();
}
closeEvent->accept();
}
void MainWindow::updatePresetControls()
@ -1942,17 +1953,6 @@ void MainWindow::on_action_removeLastDevice_triggered()
}
}
void MainWindow::on_action_Exit_triggered()
{
savePresetSettings(m_settings.getWorkingPreset(), 0);
m_settings.save();
while (m_deviceUIs.size() > 0)
{
removeLastDevice();
}
}
void MainWindow::tabInputViewIndexChanged()
{
int inputViewIndex = ui->tabInputsView->currentIndex();

Wyświetl plik

@ -392,7 +392,6 @@ private slots:
void on_action_addSinkDevice_triggered();
void on_action_addMIMODevice_triggered();
void on_action_removeLastDevice_triggered();
void on_action_Exit_triggered();
void tabInputViewIndexChanged();
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
};