From ece0c0a5e7e0b18beb58ccd868bde54c7be64f78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 22 Nov 2019 14:46:58 +0100 Subject: Tidy nullptr usage Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/widgets/kernel/qwindowcontainer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/widgets/kernel/qwindowcontainer.cpp') diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index fd8581edbb..b4d889fdfa 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -58,8 +58,8 @@ public: Q_DECLARE_PUBLIC(QWindowContainer) QWindowContainerPrivate() - : window(0) - , oldFocusWindow(0) + : window(nullptr) + , oldFocusWindow(nullptr) , usesNativeWidgets(false) { } @@ -70,7 +70,7 @@ public: QWindowContainer *wc = qobject_cast(w); if (wc) return wc->d_func(); - return 0; + return nullptr; } void updateGeometry() { @@ -90,7 +90,7 @@ public: void updateUsesNativeWidgets() { - if (window->parent() == 0) + if (window->parent() == nullptr) return; Q_Q(QWindowContainer); if (q->internalWinId()) { @@ -295,7 +295,7 @@ bool QWindowContainer::event(QEvent *e) case QEvent::ChildRemoved: { QChildEvent *ce = static_cast(e); if (ce->child() == d->window) - d->window = 0; + d->window = nullptr; break; } // The only thing we are interested in is making sure our sizes stay -- cgit v1.2.3