summaryrefslogtreecommitdiff
path: root/plugingui/plugingui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/plugingui.cc')
-rw-r--r--plugingui/plugingui.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index 0a68d72..9bb451d 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -224,10 +224,9 @@ void PluginGUI::deinit()
if(window) delete window;
}
-void closeEventHandler(void *ptr)
+void PluginGUI::closeEventHandler()
{
- volatile bool *closing = (volatile bool*)ptr;
- *closing = true;
+ closing = true;
}
void PluginGUI::init()
@@ -238,8 +237,8 @@ void PluginGUI::init()
config->load();
window = new Window();
- window->eventHandler()->registerCloseHandler(closeEventHandler,
- (void*)&closing);
+ auto eventHandler = window->eventHandler();
+ CONNECT(eventHandler, closeNotifier, this, &PluginGUI::closeEventHandler);
window->setFixedSize(370, 330);
window->setCaption("DrumGizmo v" VERSION);