mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-12 11:26:11 -05:00
Main window: handle window closing correctly
This commit is contained in:
parent
a6a6a078f5
commit
0af803551a
@ -812,8 +812,19 @@ void MainWindow::createStatusBar()
|
|||||||
statusBar()->addPermanentWidget(m_dateTimeWidget);
|
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()
|
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()
|
void MainWindow::tabInputViewIndexChanged()
|
||||||
{
|
{
|
||||||
int inputViewIndex = ui->tabInputsView->currentIndex();
|
int inputViewIndex = ui->tabInputsView->currentIndex();
|
||||||
|
@ -392,7 +392,6 @@ private slots:
|
|||||||
void on_action_addSinkDevice_triggered();
|
void on_action_addSinkDevice_triggered();
|
||||||
void on_action_addMIMODevice_triggered();
|
void on_action_addMIMODevice_triggered();
|
||||||
void on_action_removeLastDevice_triggered();
|
void on_action_removeLastDevice_triggered();
|
||||||
void on_action_Exit_triggered();
|
|
||||||
void tabInputViewIndexChanged();
|
void tabInputViewIndexChanged();
|
||||||
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
|
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user