From ce19cf9c61bfe241e736ab28c7dbb01a08325d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 1 Apr 2017 17:06:29 +0200 Subject: Fix closing of MainWindow. --- plugingui/mainwindow.h | 2 +- plugingui/testmain.cc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugingui/mainwindow.h b/plugingui/mainwindow.h index 89e323a..4b5dad1 100644 --- a/plugingui/mainwindow.h +++ b/plugingui/mainwindow.h @@ -51,10 +51,10 @@ public: //! Notify when window is closing. Notifier<> closeNotifier; + void closeEventHandler(); private: void sizeChanged(std::size_t width, std::size_t height); - void closeEventHandler(); // From Widget void repaintEvent(RepaintEvent* repaintEvent) override final; diff --git a/plugingui/testmain.cc b/plugingui/testmain.cc index 0bbd21f..c565a38 100644 --- a/plugingui/testmain.cc +++ b/plugingui/testmain.cc @@ -47,6 +47,8 @@ int main() Settings settings; GUI::MainWindow main_window(settings, parent.getNativeWindowHandle()); + CONNECT(&parent, eventHandler()->closeNotifier, + &main_window, &GUI::MainWindow::closeEventHandler); parent.show(); main_window.show(); -- cgit v1.2.3