summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetwindow.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-09 01:00:35 +0100
committerLars Knoll <lars.knoll@qt.io>2019-12-09 10:16:01 +0100
commitbef74b6c3a0a9c8649ea8eb333d80015f76863e4 (patch)
tree41cdf5b6776c90a6d04a1d6680f4d47a90593746 /src/widgets/kernel/qwidgetwindow.cpp
parentf8d2975b6a8b36bf8dd304c99783947a72081b79 (diff)
parent4c3c63d4cbb81b38e88e06b72749e7e01497b6f1 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow.cpp')
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 596343c52f..904067afda 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -57,10 +57,10 @@ QT_BEGIN_NAMESPACE
Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets();
-Q_WIDGETS_EXPORT QWidget *qt_button_down = 0; // widget got last button-down
+Q_WIDGETS_EXPORT QWidget *qt_button_down = nullptr; // widget got last button-down
// popup control
-QWidget *qt_popup_down = 0; // popup that contains the pressed widget
+QWidget *qt_popup_down = nullptr; // popup that contains the pressed widget
extern int openPopupCount;
bool qt_replay_popup_mouse_event = false;
extern bool qt_try_modal(QWidget *widget, QEvent::Type type);
@@ -156,7 +156,7 @@ QOpenGLContext *QWidgetWindowPrivate::shareContext() const
#endif // opengl
QWidgetWindow::QWidgetWindow(QWidget *widget)
- : QWindow(*new QWidgetWindowPrivate(), 0)
+ : QWindow(*new QWidgetWindowPrivate(), nullptr)
, m_widget(widget)
{
updateObjectName();
@@ -179,7 +179,7 @@ QAccessibleInterface *QWidgetWindow::accessibleRoot() const
{
if (m_widget)
return QAccessible::queryAccessibleInterface(m_widget);
- return 0;
+ return nullptr;
}
#endif
@@ -374,7 +374,7 @@ bool QWidgetWindow::event(QEvent *event)
#endif // QT_NO_CONTEXTMENU
case QEvent::WindowBlocked:
- qt_button_down = 0;
+ qt_button_down = nullptr;
break;
case QEvent::UpdateRequest:
@@ -393,7 +393,7 @@ bool QWidgetWindow::event(QEvent *event)
return QWindow::event(event);
}
-QPointer<QWidget> qt_last_mouse_receiver = 0;
+QPointer<QWidget> qt_last_mouse_receiver = nullptr;
void QWidgetWindow::handleEnterLeaveEvent(QEvent *event)
{
@@ -406,7 +406,7 @@ void QWidgetWindow::handleEnterLeaveEvent(QEvent *event)
return;
#endif
if (event->type() == QEvent::Leave) {
- QWidget *enter = 0;
+ QWidget *enter = nullptr;
// Check from window system event queue if the next queued enter targets a window
// in the same window hierarchy (e.g. enter a child of this window). If so,
// remove the enter event from queue and handle both in single dispatch.
@@ -484,13 +484,13 @@ QWidget *QWidgetWindow::getFocusWidget(FocusWidgets fw)
void QWidgetWindow::handleFocusInEvent(QFocusEvent *e)
{
- QWidget *focusWidget = 0;
+ QWidget *focusWidget = nullptr;
if (e->reason() == Qt::BacktabFocusReason)
focusWidget = getFocusWidget(LastFocusWidget);
else if (e->reason() == Qt::TabFocusReason)
focusWidget = getFocusWidget(FirstFocusWidget);
- if (focusWidget != 0)
+ if (focusWidget != nullptr)
focusWidget->setFocus();
}
@@ -513,8 +513,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
QWidget *popupChild = activePopupWidget->childAt(mapped);
if (activePopupWidget != qt_popup_down) {
- qt_button_down = 0;
- qt_popup_down = 0;
+ qt_button_down = nullptr;
+ qt_popup_down = nullptr;
}
switch (event->type()) {
@@ -589,7 +589,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
&& qt_replay_popup_mouse_event
&& QGuiApplicationPrivate::platformIntegration()->styleHint(QPlatformIntegration::ReplayMousePressOutsidePopup).toBool()) {
if (m_widget->windowType() != Qt::Popup)
- qt_button_down = 0;
+ qt_button_down = nullptr;
if (event->type() == QEvent::MouseButtonPress) {
// the popup disappeared, replay the mouse press event
QWidget *w = QApplication::widgetAt(event->globalPos());
@@ -636,8 +636,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
#endif
if (releaseAfter) {
- qt_button_down = 0;
- qt_popup_down = 0;
+ qt_button_down = nullptr;
+ qt_popup_down = nullptr;
}
return;
}
@@ -1050,7 +1050,7 @@ bool QWidgetWindow::nativeEvent(const QByteArray &eventType, void *message, long
#if QT_CONFIG(tabletevent)
void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
{
- static QPointer<QWidget> qt_tablet_target = 0;
+ static QPointer<QWidget> qt_tablet_target = nullptr;
QWidget *widget = qt_tablet_target;
@@ -1076,7 +1076,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
}
if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton)
- qt_tablet_target = 0;
+ qt_tablet_target = nullptr;
}
#endif // QT_CONFIG(tabletevent)
@@ -1084,7 +1084,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
void QWidgetWindow::handleGestureEvent(QNativeGestureEvent *e)
{
// copy-pasted code to find correct widget follows:
- QObject *receiver = 0;
+ QObject *receiver = nullptr;
if (QApplicationPrivate::inPopupMode()) {
QWidget *popup = QApplication::activePopupWidget();
QWidget *popupFocusWidget = popup->focusWidget();