aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-10-21 09:25:01 +0200
committerLars Knoll <lars.knoll@qt.io>2020-10-21 11:25:23 +0200
commit06ad243417a7133fa0cbe32f17703cd5943a7a4e (patch)
treed1583f27fed759c6cd8640ea010b33cb62bbe7a4
parent0ecc1e928c096ce7f29a9c9eeee5f6b77b8f6292 (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.cpp6
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);