summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-04-16 15:49:14 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-04-24 17:40:09 +0200
commit5d32552cf40d8ec15ed313f71559444c8765efd2 (patch)
tree023d5ec3cbb4d135dd6c2a2002c460e2e7437c51 /src/widgets/kernel/qwidget.cpp
parentfd894fd68edf3d67975cda8eb9dda43646887b0d (diff)
Move QMargins operator| into qmargins.h, add equivalent for QMarginsF
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ø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp8
1 files changed, 0 insertions, 8 deletions
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