diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2010-11-02 14:20:38 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-11-03 10:50:48 (GMT) |
commit | 86ea8521c6f145be24c40c799b6b4e8f6e854e2b (patch) | |
tree | bbceb07abeb3f8b974287ea648fd995b4ba8345c /tests/auto/qbrush | |
parent | d12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe (diff) | |
download | Qt-86ea8521c6f145be24c40c799b6b4e8f6e854e2b.zip Qt-86ea8521c6f145be24c40c799b6b4e8f6e854e2b.tar.gz Qt-86ea8521c6f145be24c40c799b6b4e8f6e854e2b.tar.bz2 |
Add member-swap to shared datatypes that don't have it.
For consistency.
Merge-request: 871
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'tests/auto/qbrush')
-rw-r--r-- | tests/auto/qbrush/tst_qbrush.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qbrush/tst_qbrush.cpp b/tests/auto/qbrush/tst_qbrush.cpp index 7e94f37..c9be552 100644 --- a/tests/auto/qbrush/tst_qbrush.cpp +++ b/tests/auto/qbrush/tst_qbrush.cpp @@ -76,6 +76,7 @@ private slots: void textures(); + void swap(); void nullBrush(); void isOpaque(); void debug(); @@ -385,6 +386,14 @@ void tst_QBrush::textures() QCOMPARE(image_brush.textureImage(), image_source); } +void tst_QBrush::swap() +{ + QBrush b1(Qt::black), b2(Qt::white); + b1.swap(b2); + QCOMPARE(b1.color(), QColor(Qt::white)); + QCOMPARE(b2.color(), QColor(Qt::black)); +} + void tst_QBrush::nullBrush() { QBrush brush(QColor(100,0,0), Qt::NoBrush); |