diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-09 01:00:35 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-09 10:16:01 +0100 |
commit | bef74b6c3a0a9c8649ea8eb333d80015f76863e4 (patch) | |
tree | 41cdf5b6776c90a6d04a1d6680f4d47a90593746 /src/widgets/widgets/qfocusframe.cpp | |
parent | f8d2975b6a8b36bf8dd304c99783947a72081b79 (diff) | |
parent | 4c3c63d4cbb81b38e88e06b72749e7e01497b6f1 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
Diffstat (limited to 'src/widgets/widgets/qfocusframe.cpp')
-rw-r--r-- | src/widgets/widgets/qfocusframe.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/widgets/qfocusframe.cpp b/src/widgets/widgets/qfocusframe.cpp index ee24e92c7e..4d64c24db3 100644 --- a/src/widgets/widgets/qfocusframe.cpp +++ b/src/widgets/widgets/qfocusframe.cpp @@ -55,8 +55,8 @@ class QFocusFramePrivate : public QWidgetPrivate bool showFrameAboveWidget; public: QFocusFramePrivate() { - widget = 0; - frameParent = 0; + widget = nullptr; + frameParent = nullptr; sendChildEvents = false; showFrameAboveWidget = false; } @@ -159,7 +159,7 @@ QFocusFrame::QFocusFrame(QWidget *parent) setAttribute(Qt::WA_TransparentForMouseEvents); setFocusPolicy(Qt::NoFocus); setAttribute(Qt::WA_NoChildEventsForParent, true); - setAttribute(Qt::WA_AcceptDrops, style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, this)); + setAttribute(Qt::WA_AcceptDrops, style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, nullptr, this)); } /*! @@ -184,7 +184,7 @@ QFocusFrame::setWidget(QWidget *widget) { Q_D(QFocusFrame); - if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, this)) + if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, nullptr, this)) d->showFrameAboveWidget = true; else d->showFrameAboveWidget = false; @@ -205,7 +205,7 @@ QFocusFrame::setWidget(QWidget *widget) d->widget = widget; d->widget->installEventFilter(this); QWidget *p = widget->parentWidget(); - QWidget *prev = 0; + QWidget *prev = nullptr; if (d->showFrameAboveWidget) { // Find the right parent for the focus frame. while (p) { @@ -231,7 +231,7 @@ QFocusFrame::setWidget(QWidget *widget) } d->update(); } else { - d->widget = 0; + d->widget = nullptr; hide(); } } @@ -290,7 +290,7 @@ QFocusFrame::eventFilter(QObject *o, QEvent *e) case QEvent::ParentChange: if (d->showFrameAboveWidget) { QWidget *w = d->widget; - setWidget(0); + setWidget(nullptr); setWidget(w); } else { d->update(); @@ -304,13 +304,13 @@ QFocusFrame::eventFilter(QObject *o, QEvent *e) setPalette(d->widget->palette()); break; case QEvent::ZOrderChange: - if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, 0, this)) + if (style()->styleHint(QStyle::SH_FocusFrame_AboveWidget, nullptr, this)) raise(); else stackUnder(d->widget); break; case QEvent::Destroy: - setWidget(0); + setWidget(nullptr); break; default: break; |