From cf482d702bbc5eeef12bbfdaefd2710e727dece3 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 6 Sep 2020 18:22:39 +0200 Subject: tst_qmenubar: stop doing math on an enum Cast to the right datatypes. Change-Id: Ia1ba9be1b0530263e810b50408f432dca485744c Reviewed-by: Volker Hilsheimer --- tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/widgets') diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp index 39ab5f6ebf..7a9676f56b 100644 --- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp @@ -290,7 +290,7 @@ QAction *tst_QMenuBar::createCharacterAction(QMenu *menu, char lowerAscii) action->setObjectName(text); action->setData(QVariant(int(lowerAscii))); #if QT_CONFIG(shortcut) - action->setShortcut(Qt::CTRL + (lowerAscii - 'a' + Qt::Key_A)); + action->setShortcut(Qt::CTRL + Qt::Key(lowerAscii - 'a' + int(Qt::Key_A))); #endif connect(action, SIGNAL(triggered()), this, SLOT(onComplexActionTriggered())); return action; -- cgit v1.2.3