summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-01 17:06:29 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-01 17:08:16 +0200
commitce19cf9c61bfe241e736ab28c7dbb01a08325d69 (patch)
tree63001aab412d014a1d01a3a45dae38572db91f48
parenta51479061c5fdcfbd9fabb14f4b597f2748d919d (diff)
Fix closing of MainWindow.
-rw-r--r--plugingui/mainwindow.h2
-rw-r--r--plugingui/testmain.cc2
2 files changed, 3 insertions, 1 deletions
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();