diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/widgets/qabstractspinbox.cpp | 6 | ||||
-rw-r--r-- | src/widgets/widgets/qabstractspinbox.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp index 494e30c7c7..8ccad5c35d 100644 --- a/src/widgets/widgets/qabstractspinbox.cpp +++ b/src/widgets/widgets/qabstractspinbox.cpp @@ -1246,11 +1246,9 @@ void QAbstractSpinBox::timerEvent(QTimerEvent *event) \reimp */ +#if QT_CONFIG(contextmenu) void QAbstractSpinBox::contextMenuEvent(QContextMenuEvent *event) { -#ifdef QT_NO_CONTEXTMENU - Q_UNUSED(event); -#else Q_D(QAbstractSpinBox); QPointer<QMenu> menu = d->edit->createStandardContextMenu(); @@ -1286,8 +1284,8 @@ void QAbstractSpinBox::contextMenuEvent(QContextMenuEvent *event) } } event->accept(); -#endif // QT_NO_CONTEXTMENU } +#endif // QT_CONFIG(contextmenu) /*! \reimp diff --git a/src/widgets/widgets/qabstractspinbox.h b/src/widgets/widgets/qabstractspinbox.h index ac46894a27..b60178b94c 100644 --- a/src/widgets/widgets/qabstractspinbox.h +++ b/src/widgets/widgets/qabstractspinbox.h @@ -142,7 +142,9 @@ protected: #endif void focusInEvent(QFocusEvent *event) override; void focusOutEvent(QFocusEvent *event) override; +#if QT_CONFIG(contextmenu) void contextMenuEvent(QContextMenuEvent *event) override; +#endif void changeEvent(QEvent *event) override; void closeEvent(QCloseEvent *event) override; void hideEvent(QHideEvent *event) override; |