summaryrefslogtreecommitdiffstats
path: root/src/qt4_in_gtk2.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-03-18 12:02:05 +0100
committerDavid Robillard <d@drobilla.net>2017-03-18 12:05:15 +0100
commit43a25ed63a9144afe32a4fea520412770394822c (patch)
tree67c7aa044726304b71794f64316ad68d29758325 /src/qt4_in_gtk2.cpp
parent64a2647d8d81b5c23d22b52cc9e0dd2595270b67 (diff)
downloadsuil-43a25ed63a9144afe32a4fea520412770394822c.tar.gz
suil-43a25ed63a9144afe32a4fea520412770394822c.tar.bz2
suil-43a25ed63a9144afe32a4fea520412770394822c.zip
Add suil_init()
This allows the actual host argc and argv to be passed to QApplication if it is created by Suil (for Qt in non-Qt cases), and initializes X11 threads to fix Qt5 in Gtk2.
Diffstat (limited to 'src/qt4_in_gtk2.cpp')
-rw-r--r--src/qt4_in_gtk2.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qt4_in_gtk2.cpp b/src/qt4_in_gtk2.cpp
index 443c8f0..fbec381 100644
--- a/src/qt4_in_gtk2.cpp
+++ b/src/qt4_in_gtk2.cpp
@@ -142,8 +142,7 @@ suil_wrapper_new(SuilHost* host,
if (qApp) {
wrap->app = qApp;
} else {
- static int argc = 0;
- wrap->app = new QApplication(argc, NULL, true);
+ wrap->app = new QApplication(host->argc, host->argv, true);
}
wrap->wrapper = NULL;