From 3e4a16330462042802d42246f7a977cfc30846c8 Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 20 May 2016 22:14:07 +0200 Subject: [PATCH] Multi device support: proper use of on action Exit trigger --- sdrbase/mainwindow.cpp | 17 ++++++++++------- sdrbase/mainwindow.h | 1 + 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index de4948cfb..46d670812 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -162,13 +162,6 @@ MainWindow::MainWindow(QWidget* parent) : MainWindow::~MainWindow() { - saveSettings(); - - while (m_deviceUIs.size() > 0) - { - removeLastDevice(); - } - delete m_pluginManager; delete m_dateTimeWidget; delete m_showSystemWidget; @@ -716,6 +709,16 @@ void MainWindow::on_action_removeDevice_triggered() } } +void MainWindow::on_action_Exit_triggered() +{ + saveSettings(); + + while (m_deviceUIs.size() > 0) + { + removeLastDevice(); + } +} + void MainWindow::tabInputViewIndexChanged() { int inputViewIndex = ui->tabInputsView->currentIndex(); diff --git a/sdrbase/mainwindow.h b/sdrbase/mainwindow.h index bd48a0c40..5af1f7515 100644 --- a/sdrbase/mainwindow.h +++ b/sdrbase/mainwindow.h @@ -155,6 +155,7 @@ private slots: void on_action_About_triggered(); void on_action_addDevice_triggered(); void on_action_removeDevice_triggered(); + void on_action_Exit_triggered(); void tabInputViewIndexChanged(); };