From 5d32552cf40d8ec15ed313f71559444c8765efd2 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 16 Apr 2020 15:49:14 +0200 Subject: Move QMargins operator| into qmargins.h, add equivalent for QMarginsF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses FIXME comment in qwidget.cpp, where the operator is being used. Add documentation, make constexpr and add noexcept as for the other operators. As a drive-by, remove invalid const from return type in the documentation of the other operators. They all return a non-const QMargins object. Change-Id: I5a9ca82978d38acd02e03ec00ca202fe1b8cf6c1 Reviewed-by: Tor Arne Vestbø --- src/widgets/kernel/qwidget.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/widgets/kernel/qwidget.cpp') diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 06080a0f42..d7cb7e2f10 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -7414,14 +7414,6 @@ void QWidgetPrivate::updateContentsRect() QCoreApplication::sendEvent(q, &e); } - -// FIXME: Move to qmargins.h for next minor Qt release -QMargins operator|(const QMargins &m1, const QMargins &m2) -{ - return QMargins(qMax(m1.left(), m2.left()), qMax(m1.top(), m2.top()), - qMax(m1.right(), m2.right()), qMax(m1.bottom(), m2.bottom())); -} - /*! \since 4.6 -- cgit v1.2.3