From 130fd22d399624c863bbaad2f72d2213a48e9e13 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 24 May 2019 19:51:38 +0200 Subject: QWidget/QLineEdit: deprecate get{Contents,Text}Margins() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Lars Knoll --- src/widgets/kernel/qwidget.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/widgets/kernel/qwidget.h') diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index e47deb5d0d..0777bed65c 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -524,7 +524,10 @@ public: void setContentsMargins(int left, int top, int right, int bottom); void setContentsMargins(const QMargins &margins); +#if QT_DEPRECATED_SINCE(5, 14) + QT_DEPRECATED_X("use contentsMargins()") void getContentsMargins(int *left, int *top, int *right, int *bottom) const; +#endif QMargins contentsMargins() const; QRect contentsRect() const; -- cgit v1.2.3