summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglbuffer.cpp4
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp4
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp
index 537097c09f..5ad16a8438 100644
--- a/src/gui/opengl/qopenglbuffer.cpp
+++ b/src/gui/opengl/qopenglbuffer.cpp
@@ -545,9 +545,9 @@ void *QOpenGLBuffer::map(QOpenGLBuffer::Access access)
qWarning("QOpenGLBuffer::map(): buffer not created");
#endif
if (!d->guard || !d->guard->id())
- return 0;
+ return nullptr;
if (d->funcs->hasOpenGLExtension(QOpenGLExtensions::MapBufferRange)) {
- QOpenGLBuffer::RangeAccessFlags rangeAccess = 0;
+ QOpenGLBuffer::RangeAccessFlags rangeAccess;
switch (access) {
case QOpenGLBuffer::ReadOnly:
rangeAccess = QOpenGLBuffer::RangeRead;
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 8ec814296a..42186ace23 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -489,7 +489,7 @@ QOpenGLFunctions::OpenGLFeatures QOpenGLFunctions::openGLFeatures() const
{
QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);
if (!d)
- return 0;
+ return { };
if (d->m_features == -1)
d->m_features = qt_gl_resolve_features();
return QOpenGLFunctions::OpenGLFeatures(d->m_features);
@@ -527,7 +527,7 @@ QOpenGLExtensions::OpenGLExtensions QOpenGLExtensions::openGLExtensions()
{
QOpenGLFunctionsPrivateEx *d = static_cast<QOpenGLFunctionsPrivateEx *>(d_ptr);
if (!d)
- return 0;
+ return { };
if (d->m_extensions == -1)
d->m_extensions = qt_gl_resolve_extensions();
return QOpenGLExtensions::OpenGLExtensions(d->m_extensions);
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 47394999c6..20cc2b5ae5 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1575,7 +1575,7 @@ void QOpenGL2PaintEngineEx::drawImage(const QRectF& dest, const QImage& image, c
case QImage::Format_ARGB32:
case QImage::Format_RGBA64:
d->shaderManager->setSrcPixelType(QOpenGLEngineShaderManager::NonPremultipliedImageSrc);
- bindOption = 0;
+ bindOption = { };
break;
case QImage::Format_Alpha8:
if (ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::TextureRGFormats)) {