diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2019-03-12 11:46:26 +0100 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2019-03-14 07:37:52 +0000 |
commit | 41e7b71c410b77a81d09d3cc2e169ffd7975b4d2 (patch) | |
tree | fd0722a70d1aedf8567cc11babd10adcbbd1e797 /src/opengl | |
parent | b35eec360d4d88d094094fb54c101fad6cee5768 (diff) |
More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.
Skipping src/3rdparty, examples/, tests/
Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadermanager_p.h | 2 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 4 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h | 2 | ||||
-rw-r--r-- | src/opengl/qgl_p.h | 12 | ||||
-rw-r--r-- | src/opengl/qglframebufferobject_p.h | 6 | ||||
-rw-r--r-- | src/opengl/qglpixelbuffer_p.h | 2 | ||||
-rw-r--r-- | src/opengl/qgraphicsshadereffect_p.h | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h index ec472da2e8..d23b3ad550 100644 --- a/src/opengl/gl2paintengineex/qglengineshadermanager_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadermanager_p.h @@ -372,7 +372,7 @@ private: class QGLEngineShaderProg { public: - QGLEngineShaderProg() : program(0) {} + QGLEngineShaderProg() : program(nullptr) {} ~QGLEngineShaderProg() { if (program) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index abf5b8ea48..762aac2f65 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -175,9 +175,9 @@ public: QGL2PaintEngineExPrivate(QGL2PaintEngineEx *q_ptr) : q(q_ptr), - shaderManager(0), + shaderManager(nullptr), width(0), height(0), - ctx(0), + ctx(nullptr), useSystemClip(true), elementIndicesVBOId(0), opacityArray(0), diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index e76216ef5d..7c12ce8998 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -139,7 +139,7 @@ public: inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; } - inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : 0; } + inline const QOpenGLContextGroup *contextGroup() const { return m_textureResource ? m_textureResource->group() : nullptr; } inline int serialNumber() const { return m_serialNumber; } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index ed364283cc..4e52c0f5e9 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -203,7 +203,7 @@ const QGLContext *qt_gl_transfer_context(const QGLContext *); class QGLTemporaryContextPrivate; class QGLTemporaryContext { public: - explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = 0); + explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = nullptr); ~QGLTemporaryContext(); private: @@ -302,7 +302,7 @@ class Q_OPENGL_EXPORT QGLShareContextScope { public: QGLShareContextScope(const QGLContext *ctx) - : m_oldContext(0) + : m_oldContext(nullptr) { QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext()); if (currentContext != ctx && !QGLContext::areSharing(ctx, currentContext)) { @@ -367,7 +367,7 @@ Q_SIGNALS: class QGLTexture { public: - explicit QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D, + explicit QGLTexture(QGLContext *ctx = nullptr, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D, QGLContext::BindOptions opt = QGLContext::DefaultBindOption) : context(ctx), id(tx_id), @@ -378,7 +378,7 @@ public: ~QGLTexture() { if (options & QGLContext::MemoryManagedBindOption) { Q_ASSERT(context); - QPlatformPixmap *boundPixmap = 0; + QPlatformPixmap *boundPixmap = nullptr; context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id); } } @@ -392,9 +392,9 @@ public: bool canBindCompressedTexture (const char *buf, int len, const char *format, bool *hasAlpha); QSize bindCompressedTexture - (const QString& fileName, const char *format = 0); + (const QString& fileName, const char *format = nullptr); QSize bindCompressedTexture - (const char *buf, int len, const char *format = 0); + (const char *buf, int len, const char *format = nullptr); QSize bindCompressedTextureDDS(const char *buf, int len); QSize bindCompressedTexturePVR(const char *buf, int len); }; diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h index bf5e21cf0b..9d536527c3 100644 --- a/src/opengl/qglframebufferobject_p.h +++ b/src/opengl/qglframebufferobject_p.h @@ -124,9 +124,9 @@ private: class QGLFramebufferObjectPrivate { public: - QGLFramebufferObjectPrivate() : fbo_guard(0), texture_guard(0), depth_buffer_guard(0) - , stencil_buffer_guard(0), color_buffer_guard(0) - , valid(false), engine(0) {} + QGLFramebufferObjectPrivate() : fbo_guard(nullptr), texture_guard(nullptr), depth_buffer_guard(nullptr) + , stencil_buffer_guard(nullptr), color_buffer_guard(nullptr) + , valid(false), engine(nullptr) {} ~QGLFramebufferObjectPrivate() {} void init(QGLFramebufferObject *q, const QSize& sz, diff --git a/src/opengl/qglpixelbuffer_p.h b/src/opengl/qglpixelbuffer_p.h index 9125fcfb4b..2729ade2b6 100644 --- a/src/opengl/qglpixelbuffer_p.h +++ b/src/opengl/qglpixelbuffer_p.h @@ -77,7 +77,7 @@ private: class QGLPixelBufferPrivate { Q_DECLARE_PUBLIC(QGLPixelBuffer) public: - QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(0), widget(0), fbo(0), blit_fbo(0), pbuf(0), ctx(0) + QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(nullptr), widget(nullptr), fbo(nullptr), blit_fbo(nullptr), pbuf(nullptr), ctx(nullptr) { } bool init(const QSize &size, const QGLFormat &f, QGLWidget *shareWidget); diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h index 1a32f24d70..218caa2936 100644 --- a/src/opengl/qgraphicsshadereffect_p.h +++ b/src/opengl/qgraphicsshadereffect_p.h @@ -67,7 +67,7 @@ class Q_OPENGL_EXPORT QGraphicsShaderEffect : public QGraphicsEffect { Q_OBJECT public: - QGraphicsShaderEffect(QObject *parent = 0); + QGraphicsShaderEffect(QObject *parent = nullptr); virtual ~QGraphicsShaderEffect(); QByteArray pixelShaderFragment() const; |