summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gtk2_in_qt5.cpp15
-rw-r--r--src/instance.c2
-rw-r--r--src/x11_in_qt4.cpp4
-rw-r--r--src/x11_in_qt5.cpp24
4 files changed, 15 insertions, 30 deletions
diff --git a/src/gtk2_in_qt5.cpp b/src/gtk2_in_qt5.cpp
index 0d42ffd..6ebb8c7 100644
--- a/src/gtk2_in_qt5.cpp
+++ b/src/gtk2_in_qt5.cpp
@@ -15,10 +15,9 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <QWindow>
-#include <QWidget>
-
#include <QVBoxLayout>
+#include <QWidget>
+#include <QWindow>
#undef signals
@@ -76,16 +75,8 @@ static int
wrapper_wrap(SuilWrapper* wrapper,
SuilInstance* instance)
{
- Qt::WindowFlags wflags = Qt::Window
- | Qt::CustomizeWindowHint
- | Qt::WindowTitleHint
- | Qt::WindowSystemMenuHint
- | Qt::WindowMinMaxButtonsHint
- | Qt::WindowCloseButtonHint;
-
SuilGtk2InQt5Wrapper* const impl = (SuilGtk2InQt5Wrapper*)wrapper->impl;
- QWidget* parent = static_cast<QWidget*>(impl->parent);
- QWidget* const wrap = new QWidget(parent, wflags);
+ QWidget* const wrap = new QWidget(NULL, Qt::Window);
GtkWidget* const plug = gtk_plug_new(0);
GtkWidget* const widget = (GtkWidget*)instance->ui_widget;
diff --git a/src/instance.c b/src/instance.c
index 34f92cd..675f220 100644
--- a/src/instance.c
+++ b/src/instance.c
@@ -24,7 +24,7 @@
#define GTK2_UI_URI LV2_UI__GtkUI
#define QT4_UI_URI LV2_UI__Qt4UI
-#define QT5_UI_URI LV2_UI_PREFIX "Qt5UI"
+#define QT5_UI_URI LV2_UI__Qt5UI
#define X11_UI_URI LV2_UI__X11UI
#define WIN_UI_URI LV2_UI_PREFIX "WindowsUI"
#define COCOA_UI_URI LV2_UI__CocoaUI
diff --git a/src/x11_in_qt4.cpp b/src/x11_in_qt4.cpp
index 225f061..dd96300 100644
--- a/src/x11_in_qt4.cpp
+++ b/src/x11_in_qt4.cpp
@@ -68,10 +68,6 @@ wrapper_free(SuilWrapper* wrapper)
{
SuilX11InQt4Wrapper* impl = (SuilX11InQt4Wrapper*)wrapper->impl;
- if (impl->parent) {
- delete impl->parent;
- }
-
if (impl->host_widget) {
delete impl->host_widget;
}
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;