summaryrefslogtreecommitdiffstats
path: root/src/x11_in_qt5.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-09-13 15:29:59 +0000
committerDavid Robillard <d@drobilla.net>2015-09-13 15:29:59 +0000
commitca1c65094684479ca756ba9351681f2e23d7afb7 (patch)
treeea4641c432d119a96e3c2b0c9ca8397e6dad4c96 /src/x11_in_qt5.cpp
parent9e50f63ac4e5138f79a15df5eda65ab429f5bcb8 (diff)
downloadsuil-ca1c65094684479ca756ba9351681f2e23d7afb7.tar.gz
suil-ca1c65094684479ca756ba9351681f2e23d7afb7.tar.bz2
suil-ca1c65094684479ca756ba9351681f2e23d7afb7.zip
Fix Qt5 wrapping.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5730 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/x11_in_qt5.cpp')
-rw-r--r--src/x11_in_qt5.cpp24
1 files changed, 11 insertions, 13 deletions
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 <QWidget>
#include <QTimerEvent>
+#include <QCloseEvent>
#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;