diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-02-20 13:35:03 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-02-20 14:15:08 +0000 |
commit | 1ebb4e0d64bf27dfc6c38b9770ae744fad87fb82 (patch) | |
tree | f92eb1649a32785f93fe6af8df82c8d0611b21e0 /src/client/qwaylandwindow.cpp | |
parent | abfdf34f510b64439c85cc54f47b41c4ce3f9c61 (diff) |
Use nullptr instead of 0 or NULL
Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some
manual cleanup to prevent QFlag macros to be affected.
Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 2e709440f..75dfaa499 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -75,15 +75,15 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { -QWaylandWindow *QWaylandWindow::mMouseGrab = 0; +QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr; QWaylandWindow::QWaylandWindow(QWindow *window) : QObject() , QPlatformWindow(window) , mDisplay(waylandScreen()->display()) - , mShellSurface(0) - , mSubSurfaceWindow(0) - , mWindowDecoration(0) + , mShellSurface(nullptr) + , mSubSurfaceWindow(nullptr) + , mWindowDecoration(nullptr) , mMouseEventsInContentArea(false) , mMousePressedInContentArea(Qt::NoButton) , mWaitingForFrameSync(false) @@ -124,7 +124,7 @@ QWaylandWindow::~QWaylandWindow() } if (mMouseGrab == this) { - mMouseGrab = 0; + mMouseGrab = nullptr; } } @@ -256,9 +256,9 @@ void QWaylandWindow::reset(bool sendDestroyEvent) QGuiApplication::sendEvent(window(), &e); } delete mShellSurface; - mShellSurface = 0; + mShellSurface = nullptr; delete mSubSurfaceWindow; - mSubSurfaceWindow = 0; + mSubSurfaceWindow = nullptr; if (isInitialized()) destroy(); @@ -285,7 +285,7 @@ void QWaylandWindow::setParent(const QPlatformWindow *parent) if (!window()->isVisible()) return; - QWaylandWindow *oldparent = mSubSurfaceWindow ? mSubSurfaceWindow->parent() : 0; + QWaylandWindow *oldparent = mSubSurfaceWindow ? mSubSurfaceWindow->parent() : nullptr; if (oldparent == parent) return; @@ -574,7 +574,7 @@ void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y) attach(buffer->buffer(), x, y); } else { - QtWayland::wl_surface::attach(0, 0, 0); + QtWayland::wl_surface::attach(nullptr, 0, 0); } } @@ -777,7 +777,7 @@ bool QWaylandWindow::createDecoration() } } else { delete mWindowDecoration; - mWindowDecoration = 0; + mWindowDecoration = nullptr; } if (hadDecoration != (bool)mWindowDecoration) { @@ -984,7 +984,7 @@ bool QWaylandWindow::setMouseGrabEnabled(bool grab) return false; } - mMouseGrab = grab ? this : 0; + mMouseGrab = grab ? this : nullptr; return true; } |