tst_qmenu: fix -Wsuggest-override

... and fix placement of {.

Amends f0049873d2.

Change-Id: I2479087005d350a23e45eda126a89e0be91c0701
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit c41e03008a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2023-06-13 15:30:55 +02:00 committed by Qt Cherry-pick Bot
parent 55fbb4c372
commit c67f69ce29

View File

@ -2060,7 +2060,8 @@ void tst_QMenu::nestedTearOffDetached()
public:
QMenu *tornOffMenu = nullptr;
protected:
bool eventFilter(QObject *receiver, QEvent *event) {
bool eventFilter(QObject *receiver, QEvent *event) override
{
if (event->type() == QEvent::Show && receiver->inherits("QTornOffMenu"))
tornOffMenu = qobject_cast<QMenu *>(receiver);
return QObject::eventFilter(receiver, event);