[LyX/master] QWidget::setContentsMargins is supported in Qt5

Jean-Marc Lasgouttes lasgouttes at lyx.org
Sun Mar 5 19:37:28 UTC 2023


commit 9156843ec2bc534da9a8600c03629c27acf971e3
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Sun Mar 5 21:37:01 2023 +0100

    QWidget::setContentsMargins is supported in Qt5
---
 src/frontends/qt/GuiCommandBuffer.cpp |    8 --------
 src/frontends/qt/IconPalette.cpp      |    4 ----
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/frontends/qt/GuiCommandBuffer.cpp b/src/frontends/qt/GuiCommandBuffer.cpp
index ee68013..4f7a8b4 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 45d774b..a3ed7b2 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);


More information about the lyx-cvs mailing list