summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-05-30 22:22:22 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-06-28 16:15:09 +0000
commit5ede5706a8b8052280981aa1d9c42999a24b74b5 (patch)
tree93240295ca4f9e21f3ce6c74748f04697c060c67 /src/widgets/kernel
parentfdbf400b27ff25f98a64879adeeb342931a84d9a (diff)
Convert features.wheelevent to QT_CONFIG
Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qapplication.cpp8
-rw-r--r--src/widgets/kernel/qapplication.h4
-rw-r--r--src/widgets/kernel/qapplication_p.h2
-rw-r--r--src/widgets/kernel/qwidget.cpp8
-rw-r--r--src/widgets/kernel/qwidget.h2
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp6
-rw-r--r--src/widgets/kernel/qwidgetwindow_p.h2
7 files changed, 16 insertions, 16 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 4ab43628b9..6ef9c1da51 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -407,7 +407,7 @@ QWidget *QApplicationPrivate::main_widget = 0; // main application widget
QWidget *QApplicationPrivate::focus_widget = 0; // has keyboard input focus
QWidget *QApplicationPrivate::hidden_focus_widget = 0; // will get keyboard input focus after show()
QWidget *QApplicationPrivate::active_window = 0; // toplevel with keyboard focus
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
QPointer<QWidget> QApplicationPrivate::wheel_widget;
#endif
bool qt_in_tab_key_event = false;
@@ -2984,7 +2984,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
case QEvent::KeyPress:
case QEvent::KeyRelease:
case QEvent::MouseMove:
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
case QEvent::Wheel:
#endif
case QEvent::TouchBegin:
@@ -3227,7 +3227,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
d->hoverGlobalPos = mouse->globalPos();
}
break;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
case QEvent::Wheel:
{
QWidget* w = static_cast<QWidget *>(receiver);
@@ -4041,7 +4041,7 @@ int QApplication::keyboardInputInterval()
\sa QStyleHints::wheelScrollLines()
*/
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
int QApplication::wheelScrollLines()
{
return styleHints()->wheelScrollLines();
diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h
index be5ec2ad05..396d0c9474 100644
--- a/src/widgets/kernel/qapplication.h
+++ b/src/widgets/kernel/qapplication.h
@@ -76,7 +76,7 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
Q_PROPERTY(int cursorFlashTime READ cursorFlashTime WRITE setCursorFlashTime)
Q_PROPERTY(int doubleClickInterval READ doubleClickInterval WRITE setDoubleClickInterval)
Q_PROPERTY(int keyboardInputInterval READ keyboardInputInterval WRITE setKeyboardInputInterval)
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
Q_PROPERTY(int wheelScrollLines READ wheelScrollLines WRITE setWheelScrollLines)
#endif
Q_PROPERTY(QSize globalStrut READ globalStrut WRITE setGlobalStrut)
@@ -154,7 +154,7 @@ public:
static void setKeyboardInputInterval(int);
static int keyboardInputInterval();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
static void setWheelScrollLines(int);
static int wheelScrollLines();
#endif
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 271844a23e..1a189cb2b9 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -195,7 +195,7 @@ public:
static QWidget *focus_widget;
static QWidget *hidden_focus_widget;
static QWidget *active_window;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
static int wheel_scroll_lines;
static QPointer<QWidget> wheel_widget;
#endif
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index f467bcfff5..b710d13e67 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -8777,7 +8777,7 @@ bool QWidget::event(QEvent *event)
case QEvent::ContextMenu:
case QEvent::KeyPress:
case QEvent::KeyRelease:
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
case QEvent::Wheel:
#endif
return false;
@@ -8801,7 +8801,7 @@ bool QWidget::event(QEvent *event)
case QEvent::MouseButtonDblClick:
mouseDoubleClickEvent((QMouseEvent*)event);
break;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
case QEvent::Wheel:
wheelEvent((QWheelEvent*)event);
break;
@@ -9418,7 +9418,7 @@ void QWidget::mouseDoubleClickEvent(QMouseEvent *event)
mousePressEvent(event);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
/*!
This event handler, for event \a event, can be reimplemented in a
subclass to receive wheel events for the widget.
@@ -9437,7 +9437,7 @@ void QWidget::wheelEvent(QWheelEvent *event)
{
event->ignore();
}
-#endif // QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
#ifndef QT_NO_TABLETEVENT
/*!
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 1c378924a0..ef456ef1da 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -613,7 +613,7 @@ protected:
virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void mouseDoubleClickEvent(QMouseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event);
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
virtual void wheelEvent(QWheelEvent *event);
#endif
virtual void keyPressEvent(QKeyEvent *event);
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 6741555c0c..f9f67cb449 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -265,7 +265,7 @@ bool QWidgetWindow::event(QEvent *event)
handleResizeEvent(static_cast<QResizeEvent *>(event));
return true;
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
case QEvent::Wheel:
handleWheelEvent(static_cast<QWheelEvent *>(event));
return true;
@@ -778,7 +778,7 @@ void QWidgetWindow::handleCloseEvent(QCloseEvent *event)
event->setAccepted(is_closing);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void QWidgetWindow::handleWheelEvent(QWheelEvent *event)
{
@@ -808,7 +808,7 @@ void QWidgetWindow::handleWheelEvent(QWheelEvent *event)
QGuiApplication::sendSpontaneousEvent(widget, &translated);
}
-#endif // QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
#ifndef QT_NO_DRAGANDDROP
diff --git a/src/widgets/kernel/qwidgetwindow_p.h b/src/widgets/kernel/qwidgetwindow_p.h
index a81355160e..944f845e3c 100644
--- a/src/widgets/kernel/qwidgetwindow_p.h
+++ b/src/widgets/kernel/qwidgetwindow_p.h
@@ -89,7 +89,7 @@ protected:
void handleTouchEvent(QTouchEvent *);
void handleMoveEvent(QMoveEvent *);
void handleResizeEvent(QResizeEvent *);
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void handleWheelEvent(QWheelEvent *);
#endif
#ifndef QT_NO_DRAGANDDROP