summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandclient.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-02-20 13:35:03 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-02-20 14:15:08 +0000
commit1ebb4e0d64bf27dfc6c38b9770ae744fad87fb82 (patch)
treef92eb1649a32785f93fe6af8df82c8d0611b21e0 /src/compositor/compositor_api/qwaylandclient.cpp
parentabfdf34f510b64439c85cc54f47b41c4ce3f9c61 (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/compositor/compositor_api/qwaylandclient.cpp')
-rw-r--r--src/compositor/compositor_api/qwaylandclient.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compositor/compositor_api/qwaylandclient.cpp b/src/compositor/compositor_api/qwaylandclient.cpp
index 122fd41c3..471c1b5a1 100644
--- a/src/compositor/compositor_api/qwaylandclient.cpp
+++ b/src/compositor/compositor_api/qwaylandclient.cpp
@@ -69,7 +69,7 @@ public:
Q_UNUSED(data);
QWaylandClient *client = reinterpret_cast<Listener *>(listener)->parent;
- Q_ASSERT(client != 0);
+ Q_ASSERT(client != nullptr);
delete client;
}
@@ -144,7 +144,7 @@ QWaylandClient::~QWaylandClient()
QWaylandClient *QWaylandClient::fromWlClient(QWaylandCompositor *compositor, wl_client *wlClient)
{
if (!wlClient)
- return 0;
+ return nullptr;
QWaylandClient *client = nullptr;
@@ -152,7 +152,7 @@ QWaylandClient *QWaylandClient::fromWlClient(QWaylandCompositor *compositor, wl_
QWaylandClientPrivate::client_destroy_callback);
if (l)
client = reinterpret_cast<QWaylandClientPrivate::Listener *>(
- wl_container_of(l, (QWaylandClientPrivate::Listener *)0, listener))->parent;
+ wl_container_of(l, (QWaylandClientPrivate::Listener *)nullptr, listener))->parent;
if (!client) {
// The original idea was to create QWaylandClient instances when