tst_qmenubar: stop doing math on an enum

Cast to the right datatypes.

Change-Id: Ia1ba9be1b0530263e810b50408f432dca485744c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Giuseppe D'Angelo 2020-09-06 18:22:39 +02:00
parent 3e210dc19a
commit cf482d702b
1 changed files with 1 additions and 1 deletions

View File

@ -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;