summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrncbc <rncbc@rncbc.org>2018-12-11 09:53:47 +0000
committerDavid Robillard <d@drobilla.net>2018-12-19 20:24:55 -0500
commit8d507420c0e91ed704b692187f9962d7fcf0e15f (patch)
tree8b907d7b19b93f7facd90231af6e658da1f3e2c1 /src
parent9a93d3c3b9ffe7ff7fe2602d0523d4f80655e8aa (diff)
downloadsuil-8d507420c0e91ed704b692187f9962d7fcf0e15f.tar.gz
suil-8d507420c0e91ed704b692187f9962d7fcf0e15f.tar.bz2
suil-8d507420c0e91ed704b692187f9962d7fcf0e15f.zip
Fix qt5_in_gtk2 wrapper
Removes the built-in QApplication instantiation and postpones the deletion of the embedded QWidget. This makes UIs work more nicely in hosts like Ardour.
Diffstat (limited to 'src')
-rw-r--r--src/qt5_in_gtk2.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/qt5_in_gtk2.cpp b/src/qt5_in_gtk2.cpp
index f0e324a..4c77c4d 100644
--- a/src/qt5_in_gtk2.cpp
+++ b/src/qt5_in_gtk2.cpp
@@ -17,7 +17,6 @@
#include <gtk/gtk.h>
-#include <QApplication>
#include <QVBoxLayout>
#include <QWidget>
#include <QWindow>
@@ -37,7 +36,6 @@ typedef struct _SuilQtWrapperClass SuilQtWrapperClass;
struct _SuilQtWrapper {
GtkSocket socket;
- QApplication* app;
QWidget* qembed;
SuilWrapper* wrapper;
SuilInstance* instance;
@@ -69,10 +67,11 @@ suil_qt_wrapper_finalize(GObject* gobject)
self->instance->handle = NULL;
}
- delete self->qembed;
+ if (self->qembed) {
+ self->qembed->deleteLater();
+ }
self->qembed = NULL;
- self->app = NULL;
self->idle_iface = NULL;
self->wrapper->impl = NULL;
@@ -90,7 +89,6 @@ suil_qt_wrapper_class_init(SuilQtWrapperClass* klass)
static void
suil_qt_wrapper_init(SuilQtWrapper* self)
{
- self->app = NULL;
self->qembed = NULL;
self->wrapper = NULL;
self->instance = NULL;
@@ -194,12 +192,6 @@ suil_wrapper_new(SuilHost* host,
SuilQtWrapper* const wrap = SUIL_QT_WRAPPER(
g_object_new(SUIL_TYPE_QT_WRAPPER, NULL));
- if (qApp) {
- wrap->app = qApp;
- } else {
- wrap->app = new QApplication(host->argc, host->argv, true);
- }
-
wrap->wrapper = NULL;
wrapper->impl = wrap;