summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration
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/hardwareintegration
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/hardwareintegration')
-rw-r--r--src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp14
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp6
4 files changed, 12 insertions, 12 deletions
diff --git a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
index 35fdc8277..c7dbe1bea 100644
--- a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
@@ -103,7 +103,7 @@ struct ::wl_resource *DrmEglServerBuffer::resourceForClient(struct ::wl_client *
auto integrationResource = m_integration->resourceMap().value(client);
if (!integrationResource) {
qWarning("DrmEglServerBuffer::resourceForClient: Trying to get resource for ServerBuffer. But client is not bound to the drm_egl interface");
- return 0;
+ return nullptr;
}
struct ::wl_resource *drm_egl_integration_resource = integrationResource->handle;
Resource *resource = add(client, 1);
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index fdaddb6ab..a088027a3 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -217,12 +217,12 @@ WaylandEglClientBufferIntegrationPrivate::WaylandEglClientBufferIntegrationPriva
: egl_display(EGL_NO_DISPLAY)
, valid(false)
, display_bound(false)
- , egl_bind_wayland_display(0)
- , egl_unbind_wayland_display(0)
- , egl_query_wayland_buffer(0)
- , egl_create_image(0)
- , egl_destroy_image(0)
- , gl_egl_image_target_texture_2d(0)
+ , egl_bind_wayland_display(nullptr)
+ , egl_unbind_wayland_display(nullptr)
+ , egl_query_wayland_buffer(nullptr)
+ , egl_create_image(nullptr)
+ , egl_destroy_image(nullptr)
+ , gl_egl_image_target_texture_2d(nullptr)
, funcs(nullptr)
{
}
@@ -593,7 +593,7 @@ quintptr WaylandEglClientBuffer::lockNativeBuffer()
EGLImageKHR image = p->egl_create_image(p->egl_display, EGL_NO_CONTEXT,
EGL_WAYLAND_BUFFER_WL,
- m_buffer, NULL);
+ m_buffer, nullptr);
return reinterpret_cast<quintptr>(image);
}
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
index 071b08827..049b8b3fe 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
@@ -69,7 +69,7 @@ QVector<EGLint> eglbuildSpec()
XCompositeEglClientBufferIntegration::XCompositeEglClientBufferIntegration()
: QtWayland::ClientBufferIntegration()
- , mDisplay(0)
+ , mDisplay(nullptr)
{
}
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
index 296a205ce..b1c947b53 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
@@ -72,8 +72,8 @@ QVector<int> qglx_buildSpec()
XCompositeGLXClientBufferIntegration::XCompositeGLXClientBufferIntegration()
: QtWayland::ClientBufferIntegration()
- , mDisplay(0)
- , mHandler(0)
+ , mDisplay(nullptr)
+ , mHandler(nullptr)
{
qDebug() << "Loading GLX integration";
}
@@ -162,7 +162,7 @@ QOpenGLTexture *XCompositeGLXClientBuffer::toOpenGlTexture(int plane)
}
tex->bind();
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- m_integration->m_glxBindTexImageEXT(m_integration->xDisplay(),m_glxPixmap,GLX_FRONT_EXT, 0);
+ m_integration->m_glxBindTexImageEXT(m_integration->xDisplay(),m_glxPixmap,GLX_FRONT_EXT, nullptr);
// TODO: release in the destructor?
// m_glxReleaseTexImageEXT(mDisplay,glxPixmap,GLX_FRONT_EXT);