summaryrefslogtreecommitdiff
path: root/tests/auto/qpen
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2010-11-02 15:20:38 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-03 11:50:48 +0100
commit86ea8521c6f145be24c40c799b6b4e8f6e854e2b (patch)
treebbceb07abeb3f8b974287ea648fd995b4ba8345c /tests/auto/qpen
parentd12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe (diff)
downloadqt4-tools-86ea8521c6f145be24c40c799b6b4e8f6e854e2b.tar.gz
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/qpen')
-rw-r--r--tests/auto/qpen/tst_qpen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qpen/tst_qpen.cpp b/tests/auto/qpen/tst_qpen.cpp
index b0c2cad734..674a520f11 100644
--- a/tests/auto/qpen/tst_qpen.cpp
+++ b/tests/auto/qpen/tst_qpen.cpp
@@ -59,6 +59,7 @@ public:
private slots:
void getSetCheck();
+ void swap();
void operator_eq_eq();
void operator_eq_eq_data();
@@ -95,6 +96,14 @@ void tst_QPen::getSetCheck()
}
}
+void tst_QPen::swap()
+{
+ QPen p1(Qt::black), p2(Qt::white);
+ p1.swap(p2);
+ QCOMPARE(p1.color(), QColor(Qt::white));
+ QCOMPARE(p2.color(), QColor(Qt::black));
+}
+
Q_DECLARE_METATYPE(QPen)
Q_DECLARE_METATYPE(QBrush)