diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-09-06 13:00:27 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-09-07 15:50:02 +0200 |
commit | fec51be2095fbae5257b9a8ad4c82d3722a8cd5f (patch) | |
tree | 254c63e2f09d17723b3c0ca18a3c269a5c2c3d8b /tests/auto/gui | |
parent | 89f7a2759c6b51343d0a1ca5a82d575abba04e0c (diff) |
tst_qshortcut (x2): use op | instead of op + to combine keys
Following the introduction of QKeyCombination, reduce the number
of warnings raised by the test. Drive-by, remove some pointless
math like Qt::SHIFT+0, which does not make any sense and would
actually fail to compile (shortly).
Refactoring the test to fully use QKeyCombination (instead of
ints) is left as a future exercise; some QKeyCombination->int
warnings are still around.
Change-Id: If825bc4c369986623447927bb11493c4f58b544f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp index fd5a4bdccf..cc0492666d 100644 --- a/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp +++ b/tests/auto/gui/kernel/qshortcut/tst_qshortcut.cpp @@ -71,7 +71,7 @@ void tst_QShortcut::trigger() ColoredWindow w(Qt::yellow); w.setTitle(QTest::currentTestFunction()); w.resize(QGuiApplication::primaryScreen()->size() / 4); - new QShortcut(Qt::CTRL + Qt::Key_Q, &w, SLOT(close())); + new QShortcut(Qt::CTRL | Qt::Key_Q, &w, SLOT(close())); w.show(); QVERIFY(QTest::qWaitForWindowExposed(&w)); sendKey(&w, Qt::Key_Q, 'q', Qt::ControlModifier); |