From ca1c65094684479ca756ba9351681f2e23d7afb7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 13 Sep 2015 15:29:59 +0000 Subject: Fix Qt5 wrapping. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5730 a436a847-0d15-0410-975c-d299462d15a1 --- src/x11_in_qt5.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/x11_in_qt5.cpp') diff --git a/src/x11_in_qt5.cpp b/src/x11_in_qt5.cpp index 4e8a817..6a8cd8a 100644 --- a/src/x11_in_qt5.cpp +++ b/src/x11_in_qt5.cpp @@ -18,6 +18,7 @@ #include #include +#include #undef signals @@ -58,6 +59,14 @@ protected: QWidget::timerEvent(event); } + void closeEvent(QCloseEvent* event) { + if (_ui_timer && _idle_iface) { + this->killTimer(_ui_timer); + _ui_timer = 0; + } + QWidget::closeEvent(event); + } + private: SuilInstance* _instance; const LV2UI_Idle_Interface* _idle_iface; @@ -69,14 +78,10 @@ wrapper_free(SuilWrapper* wrapper) { SuilX11InQt5Wrapper* impl = (SuilX11InQt5Wrapper*)wrapper->impl; - if (impl->parent) { - delete impl->parent; - } -/* if (impl->host_widget) { delete impl->host_widget; } -*/ + free(impl); } @@ -124,14 +129,7 @@ suil_wrapper_new(SuilHost* host, wrapper->wrap = wrapper_wrap; wrapper->free = wrapper_free; - Qt::WindowFlags wflags = Qt::Window - | Qt::CustomizeWindowHint - | Qt::WindowTitleHint - | Qt::WindowSystemMenuHint - | Qt::WindowMinMaxButtonsHint - | Qt::WindowCloseButtonHint; - - QWidget* const ew = new SuilQX11Widget(NULL, wflags); + QWidget* const ew = new SuilQX11Widget(NULL, Qt::Window); impl->parent = ew; -- cgit v1.2.1