Skip to content

Commit 685e7ee

Browse files
committed
Revert "qtui: Account for Qt 6 sending close events at shutdown"
No longer needed now that the main window is destroyed before QApplication::quit(). This reverts commit efacaab.
1 parent 17f3430 commit 685e7ee

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

src/qtui/main_window.cc

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -223,27 +223,15 @@ MainWindow::MainWindow()
223223
}
224224

225225
MainWindow::~MainWindow()
226-
{
227-
// should have already been called in teardown(), but we'll
228-
// make sure so that audqt isn't left with a dangling pointer
229-
audqt::unregister_dock_host();
230-
231-
if (m_search_tool)
232-
aud_plugin_remove_watch(m_search_tool, plugin_watcher, this);
233-
}
234-
235-
// should be called before QApplication::quit() in
236-
// order to tear down the UI in an orderly fashion
237-
void MainWindow::teardown()
238226
{
239227
QSettings settings(m_config_name, "QtUi");
240228
settings.setValue("geometry", saveGeometry());
241229
settings.setValue("windowState", saveState());
242230

243-
// destroy plugin windows explicitly, otherwise Qt may send close
244-
// events to them during QApplication shutdown, causing plugins to
245-
// be disabled at next startup
246231
audqt::unregister_dock_host();
232+
233+
if (m_search_tool)
234+
aud_plugin_remove_watch(m_search_tool, plugin_watcher, this);
247235
}
248236

249237
void MainWindow::closeEvent(QCloseEvent * e)

src/qtui/main_window.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ class MainWindow : public QMainWindow, audqt::DockHost
4141
MainWindow();
4242
~MainWindow();
4343

44-
void teardown();
45-
4644
private:
4745
QString m_config_name;
4846
DialogWindows m_dialogs;

src/qtui/qtui.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class QtUI : public audqt::QtIfacePlugin
7575

7676
void quit()
7777
{
78-
window->teardown();
7978
window->deleteLater();
8079
window = nullptr;
8180
}

0 commit comments

Comments
 (0)