diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-10-21 09:25:01 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-21 11:25:23 +0200 |
commit | 06ad243417a7133fa0cbe32f17703cd5943a7a4e (patch) | |
tree | d1583f27fed759c6cd8640ea010b33cb62bbe7a4 | |
parent | 0ecc1e928c096ce7f29a9c9eeee5f6b77b8f6292 (diff) |
Remove some compiler warnings
Don't cast a QKeyCombination to int.
Change-Id: If84e2fde9ea83bedd1eb8a8dbbcb050276a333cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | tests/auto/quick/qquickitem2/tst_qquickitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp index f65650cf9c..b90fe56bfe 100644 --- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -1494,9 +1494,9 @@ void tst_QQuickItem::standardKeys() QQuickItem *item = qobject_cast<QQuickItem*>(view.rootObject()); QVERIFY(item); - const int key = keySequence[0] & Qt::Key_unknown; - const int modifiers = keySequence[0] & Qt::KeyboardModifierMask; - QKeyEvent keyEvent(eventType, key, static_cast<Qt::KeyboardModifiers>(modifiers)); + const int key = keySequence[0].key(); + Qt::KeyboardModifiers modifiers = keySequence[0].keyboardModifiers(); + QKeyEvent keyEvent(eventType, key, modifiers); QGuiApplication::sendEvent(&view, &keyEvent); QCOMPARE(item->property("pressed").toBool(), pressed); |