summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandquickitem.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/qwaylandquickitem.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/qwaylandquickitem.cpp')
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index 74ce326e5..91e85b884 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -163,7 +163,7 @@ void QWaylandBufferMaterialShader::updateState(const QSGMaterialShader::RenderSt
const char * const *QWaylandBufferMaterialShader::attributeNames() const
{
- static char const *const attr[] = { "qt_VertexPosition", "qt_VertexTexCoord", 0 };
+ static char const *const attr[] = { "qt_VertexPosition", "qt_VertexTexCoord", nullptr };
return attr;
}
@@ -261,14 +261,14 @@ void QWaylandBufferMaterial::ensureTextures(int count)
}
}
-QMutex *QWaylandQuickItemPrivate::mutex = 0;
+QMutex *QWaylandQuickItemPrivate::mutex = nullptr;
class QWaylandSurfaceTextureProvider : public QSGTextureProvider
{
public:
QWaylandSurfaceTextureProvider()
: m_smooth(false)
- , m_sgTex(0)
+ , m_sgTex(nullptr)
{
}
@@ -283,7 +283,7 @@ public:
Q_ASSERT(QThread::currentThread() == thread());
m_ref = buffer;
delete m_sgTex;
- m_sgTex = 0;
+ m_sgTex = nullptr;
if (m_ref.hasBuffer()) {
if (buffer.isSharedMemory()) {
m_sgTex = surfaceItem->window()->createTextureFromImage(buffer.image());