summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-24 19:51:38 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-30 22:41:19 +0300
commit130fd22d399624c863bbaad2f72d2213a48e9e13 (patch)
treeb8ae7745316d031ae79c6d7ddf6910fd59643a78 /src/widgets/widgets/qmenu.cpp
parent76be819345228d589cbc4f5129617151ea604750 (diff)
QWidget/QLineEdit: deprecate get{Contents,Text}Margins()
We have contentsMargins() and textMargins() methods since 4.6 which are much more efficient and easier to use. [ChangeLog][QtWidgets][QLineEdit] The getTextMargins() member function has been deprecated in favor of textMargins(). [ChangeLog][QtWidgets][QWidget] The getContentsMargins() member function has been deprecated in favor of contentsMargins(). Change-Id: Ifdb890af6198fc682b94701786c67a5b945a4b4c Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r--src/widgets/widgets/qmenu.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 310c865f52..e38490dabd 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -142,9 +142,7 @@ public:
#endif
if (style() != p->style())
setStyle(p->style());
- int leftMargin, topMargin, rightMargin, bottomMargin;
- p->getContentsMargins(&leftMargin, &topMargin, &rightMargin, &bottomMargin);
- setContentsMargins(leftMargin, topMargin, rightMargin, bottomMargin);
+ setContentsMargins(p->contentsMargins());
setLayoutDirection(p->layoutDirection());
//QObject::connect(this, SIGNAL(triggered(QAction*)), this, SLOT(onTrigger(QAction*)));
//QObject::connect(this, SIGNAL(hovered(QAction*)), this, SLOT(onHovered(QAction*)));