diff options
author | John Layt <jlayt@kde.org> | 2014-02-15 16:07:52 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-21 20:33:10 +0100 |
commit | c7aa3a69253c82b8ae814c88ebbdfad7e48d0b2d (patch) | |
tree | 3219f573b3eeb7a1d0f1987f51920231f4e58453 /tests/auto/corelib/tools/qrect | |
parent | 9c6447e0815a18102e5ebe236c52ba4343dbb8fa (diff) |
QRect - Add missing QMargins subtraction operator
[ChangeLog][QtCore][QRect] Added QMargins subtraction operator.
Change-Id: I64d449e2bae81a34df2cd019cff3fb186f8aaaae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qrect')
-rw-r--r-- | tests/auto/corelib/tools/qrect/tst_qrect.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qrect/tst_qrect.cpp b/tests/auto/corelib/tools/qrect/tst_qrect.cpp index 1b11673bd1..c5e3aa58e0 100644 --- a/tests/auto/corelib/tools/qrect/tst_qrect.cpp +++ b/tests/auto/corelib/tools/qrect/tst_qrect.cpp @@ -3496,6 +3496,10 @@ void tst_QRect::margins() QCOMPARE(added, margins + rectangle); QCOMPARE(added, rectangle.marginsAdded(margins)); + const QRect subtracted = rectangle - margins; + QCOMPARE(subtracted, QRect(QPoint(12, 13), QSize(44, 42))); + QCOMPARE(subtracted, rectangle.marginsRemoved(margins)); + QRect a = rectangle; a += margins; QCOMPARE(added, a); |