From 9156843ec2bc534da9a8600c03629c27acf971e3 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 5 Mar 2023 21:37:01 +0100 Subject: [PATCH] QWidget::setContentsMargins is supported in Qt5 --- src/frontends/qt/GuiCommandBuffer.cpp | 8 -------- src/frontends/qt/IconPalette.cpp | 4 ---- 2 files changed, 12 deletions(-) diff --git a/src/frontends/qt/GuiCommandBuffer.cpp b/src/frontends/qt/GuiCommandBuffer.cpp index ee68013e2f..4f7a8b433a 100644 --- a/src/frontends/qt/GuiCommandBuffer.cpp +++ b/src/frontends/qt/GuiCommandBuffer.cpp @@ -133,17 +133,9 @@ GuiCommandBuffer::GuiCommandBuffer(GuiView * view) layout->addWidget(upPB, 0); layout->addWidget(downPB, 0); layout->addWidget(edit_, 10); -#if QT_VERSION < 0x060000 - layout->setMargin(0); -#else layout->setContentsMargins(0, 0, 0, 0); -#endif top->addLayout(layout); -#if QT_VERSION < 0x060000 - top->setMargin(0); -#else top->setContentsMargins(0, 0, 0, 0); -#endif setFocusProxy(edit_); upPB->setEnabled(!history().empty()); diff --git a/src/frontends/qt/IconPalette.cpp b/src/frontends/qt/IconPalette.cpp index 45d774bf46..a3ed7b2500 100644 --- a/src/frontends/qt/IconPalette.cpp +++ b/src/frontends/qt/IconPalette.cpp @@ -103,11 +103,7 @@ IconPalette::IconPalette(QWidget * parent) : QWidget(parent, Qt::Popup), tornoff_(false) { QVBoxLayout * v = new QVBoxLayout(this); -#if QT_VERSION < 0x060000 - v->setMargin(0); -#else v->setContentsMargins(0, 0, 0, 0); -#endif v->setSpacing(0); layout_ = new QGridLayout; layout_->setSpacing(0);