diff options
author | David Robillard <d@drobilla.net> | 2020-12-15 21:58:36 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-15 21:58:36 +0100 |
commit | 6303ef3c781e4a47e9e281e26ac0bddfb1a07a65 (patch) | |
tree | 5bf9ae82fff70c42e4136cca024e5a86c1a4c783 | |
parent | b3ca2717dd0ad4c2a7db65145f6a0dc890e42b72 (diff) | |
download | suil-6303ef3c781e4a47e9e281e26ac0bddfb1a07a65.tar.gz suil-6303ef3c781e4a47e9e281e26ac0bddfb1a07a65.tar.bz2 suil-6303ef3c781e4a47e9e281e26ac0bddfb1a07a65.zip |
Avoid use of default arguments
-rw-r--r-- | src/gtk2_in_qt5.cpp | 12 | ||||
-rw-r--r-- | src/qt5_in_gtk.cpp | 4 | ||||
-rw-r--r-- | src/x11_in_qt5.cpp | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/gtk2_in_qt5.cpp b/src/gtk2_in_qt5.cpp index 8fb7be7..eacf677 100644 --- a/src/gtk2_in_qt5.cpp +++ b/src/gtk2_in_qt5.cpp @@ -93,13 +93,15 @@ wrapper_wrap(SuilWrapper* wrapper, gtk_container_add(GTK_CONTAINER(plug), widget); gtk_widget_show_all(plug); - const WId wid = (WId)gtk_plug_get_id((GtkPlug*)plug); - QWindow* window = QWindow::fromWinId(wid); - QWidget* container = QWidget::createWindowContainer(window, wrap); - QVBoxLayout* layout = new QVBoxLayout(); + const WId wid = (WId)gtk_plug_get_id((GtkPlug*)plug); + QWindow* window = QWindow::fromWinId(wid); + QWidget* container = + QWidget::createWindowContainer(window, wrap, Qt::WindowFlags()); + + QVBoxLayout* layout = new QVBoxLayout(); layout->setMargin(0); layout->setSpacing(0); - layout->addWidget(container); + layout->addWidget(container, 0, Qt::Alignment()); wrap->setLayout(layout); #ifdef SUIL_OLD_GTK diff --git a/src/qt5_in_gtk.cpp b/src/qt5_in_gtk.cpp index 5ce395d..fee583e 100644 --- a/src/qt5_in_gtk.cpp +++ b/src/qt5_in_gtk.cpp @@ -150,7 +150,7 @@ wrapper_wrap(SuilWrapper* wrapper, { SuilQtWrapper* const wrap = SUIL_QT_WRAPPER(wrapper->impl); - wrap->qembed = new QWidget(); + wrap->qembed = new QWidget(nullptr, Qt::WindowFlags()); wrap->wrapper = wrapper; wrap->instance = instance; @@ -158,7 +158,7 @@ wrapper_wrap(SuilWrapper* wrapper, QVBoxLayout* layout = new QVBoxLayout(); layout->setMargin(0); layout->setSpacing(0); - layout->addWidget(qwidget); + layout->addWidget(qwidget, 0, Qt::Alignment()); wrap->qembed->setLayout(layout); diff --git a/src/x11_in_qt5.cpp b/src/x11_in_qt5.cpp index 87ddc2b..d5fd858 100644 --- a/src/x11_in_qt5.cpp +++ b/src/x11_in_qt5.cpp @@ -60,7 +60,7 @@ public: _instance = instance; _idle_iface = idle_iface; if (_idle_iface && _ui_timer == 0) { - _ui_timer = this->startTimer(30); + _ui_timer = this->startTimer(30, Qt::CoarseTimer); } } |