diff options
Diffstat (limited to 'tests/auto/qkeysequence/tst_qkeysequence.cpp')
-rw-r--r-- | tests/auto/qkeysequence/tst_qkeysequence.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qkeysequence/tst_qkeysequence.cpp b/tests/auto/qkeysequence/tst_qkeysequence.cpp index 60f022f..256f9f3 100644 --- a/tests/auto/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/qkeysequence/tst_qkeysequence.cpp @@ -112,6 +112,7 @@ public: virtual ~tst_QKeySequence(); private slots: + void swap(); void operatorQString_data(); void operatorQString(); void compareConstructors_data(); @@ -176,6 +177,15 @@ void tst_QKeySequence::initTestCase() qtTranslator->load(":/qt_de"); } +void tst_QKeySequence::swap() +{ + QKeySequence ks1(Qt::CTRL+Qt::Key_O); + QKeySequence ks2(Qt::CTRL+Qt::Key_L); + ks1.swap(ks2); + QCOMPARE(ks1[0], int(Qt::CTRL+Qt::Key_L)); + QCOMPARE(ks2[0], int(Qt::CTRL+Qt::Key_O)); +} + void tst_QKeySequence::operatorQString_data() { QTest::addColumn<int>("modifiers"); |