From ece0c0a5e7e0b18beb58ccd868bde54c7be64f78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 22 Nov 2019 14:46:58 +0100 Subject: Tidy nullptr usage Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/gui/opengl/qopengl.cpp | 2 +- src/gui/opengl/qopenglbuffer.cpp | 10 ++--- src/gui/opengl/qopenglcustomshaderstage.cpp | 8 ++-- src/gui/opengl/qopengldebug.cpp | 24 +++++----- src/gui/opengl/qopenglengineshadermanager.cpp | 20 ++++----- src/gui/opengl/qopenglframebufferobject.cpp | 12 ++--- src/gui/opengl/qopenglfunctions.cpp | 6 +-- src/gui/opengl/qopenglfunctions_1_0.cpp | 6 +-- src/gui/opengl/qopenglfunctions_1_1.cpp | 10 ++--- src/gui/opengl/qopenglfunctions_1_2.cpp | 14 +++--- src/gui/opengl/qopenglfunctions_1_3.cpp | 18 ++++---- src/gui/opengl/qopenglfunctions_1_4.cpp | 22 ++++----- src/gui/opengl/qopenglfunctions_1_5.cpp | 24 +++++----- src/gui/opengl/qopenglfunctions_2_0.cpp | 26 +++++------ src/gui/opengl/qopenglfunctions_2_1.cpp | 28 ++++++------ src/gui/opengl/qopenglfunctions_3_0.cpp | 30 ++++++------- src/gui/opengl/qopenglfunctions_3_1.cpp | 22 ++++----- .../opengl/qopenglfunctions_3_2_compatibility.cpp | 34 +++++++------- src/gui/opengl/qopenglfunctions_3_2_core.cpp | 24 +++++----- .../opengl/qopenglfunctions_3_3_compatibility.cpp | 38 ++++++++-------- src/gui/opengl/qopenglfunctions_3_3_core.cpp | 26 +++++------ .../opengl/qopenglfunctions_4_0_compatibility.cpp | 40 ++++++++--------- src/gui/opengl/qopenglfunctions_4_0_core.cpp | 28 ++++++------ .../opengl/qopenglfunctions_4_1_compatibility.cpp | 42 ++++++++--------- src/gui/opengl/qopenglfunctions_4_1_core.cpp | 30 ++++++------- .../opengl/qopenglfunctions_4_2_compatibility.cpp | 44 +++++++++--------- src/gui/opengl/qopenglfunctions_4_2_core.cpp | 32 ++++++------- .../opengl/qopenglfunctions_4_3_compatibility.cpp | 46 +++++++++---------- src/gui/opengl/qopenglfunctions_4_3_core.cpp | 34 +++++++------- .../opengl/qopenglfunctions_4_4_compatibility.cpp | 48 ++++++++++---------- src/gui/opengl/qopenglfunctions_4_4_core.cpp | 36 +++++++-------- .../opengl/qopenglfunctions_4_5_compatibility.cpp | 52 +++++++++++----------- src/gui/opengl/qopenglfunctions_4_5_core.cpp | 38 ++++++++-------- src/gui/opengl/qopenglpaintdevice.cpp | 2 +- src/gui/opengl/qopenglpaintengine.cpp | 20 ++++----- src/gui/opengl/qopenglshaderprogram.cpp | 12 ++--- src/gui/opengl/qopengltexture.cpp | 32 ++++++------- src/gui/opengl/qopengltextureglyphcache.cpp | 34 +++++++------- src/gui/opengl/qopengltimerquery.cpp | 26 +++++------ src/gui/opengl/qopenglversionfunctions.cpp | 2 +- src/gui/opengl/qopenglversionfunctionsfactory.cpp | 2 +- src/gui/opengl/qopenglvertexarrayobject.cpp | 16 +++---- 42 files changed, 510 insertions(+), 510 deletions(-) (limited to 'src/gui/opengl') diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index 667d16317f..adca536797 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -72,7 +72,7 @@ QOpenGLExtensionMatcher::QOpenGLExtensionMatcher() return; } QOpenGLFunctions *funcs = ctx->functions(); - const char *extensionStr = 0; + const char *extensionStr = nullptr; if (ctx->isOpenGLES() || ctx->format().majorVersion() < 3) extensionStr = reinterpret_cast(funcs->glGetString(GL_EXTENSIONS)); diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp index 5ad16a8438..5387cc06e3 100644 --- a/src/gui/opengl/qopenglbuffer.cpp +++ b/src/gui/opengl/qopenglbuffer.cpp @@ -143,10 +143,10 @@ public: QOpenGLBufferPrivate(QOpenGLBuffer::Type t) : ref(1), type(t), - guard(0), + guard(nullptr), usagePattern(QOpenGLBuffer::StaticDraw), actualUsagePattern(QOpenGLBuffer::StaticDraw), - funcs(0) + funcs(nullptr) { } @@ -323,10 +323,10 @@ void QOpenGLBuffer::destroy() Q_D(QOpenGLBuffer); if (d->guard) { d->guard->free(); - d->guard = 0; + d->guard = nullptr; } delete d->funcs; - d->funcs = 0; + d->funcs = nullptr; } /*! @@ -586,7 +586,7 @@ void *QOpenGLBuffer::mapRange(int offset, int count, QOpenGLBuffer::RangeAccessF qWarning("QOpenGLBuffer::mapRange(): buffer not created"); #endif if (!d->guard || !d->guard->id()) - return 0; + return nullptr; return d->funcs->glMapBufferRange(d->type, offset, count, access); } diff --git a/src/gui/opengl/qopenglcustomshaderstage.cpp b/src/gui/opengl/qopenglcustomshaderstage.cpp index baa44f86b0..a95a0a5767 100644 --- a/src/gui/opengl/qopenglcustomshaderstage.cpp +++ b/src/gui/opengl/qopenglcustomshaderstage.cpp @@ -48,7 +48,7 @@ class QOpenGLCustomShaderStagePrivate { public: QOpenGLCustomShaderStagePrivate() : - m_manager(0) {} + m_manager(nullptr) {} QPointer m_manager; QByteArray m_source; @@ -110,8 +110,8 @@ void QOpenGLCustomShaderStage::removeFromPainter(QPainter* p) // Just set the stage to null, don't call removeCustomStage(). // This should leave the program in a compiled/linked state // if the next custom shader stage is this one again. - d->m_manager->setCustomStage(0); - d->m_manager = 0; + d->m_manager->setCustomStage(nullptr); + d->m_manager = nullptr; } QByteArray QOpenGLCustomShaderStage::source() const @@ -125,7 +125,7 @@ QByteArray QOpenGLCustomShaderStage::source() const void QOpenGLCustomShaderStage::setInactive() { Q_D(QOpenGLCustomShaderStage); - d->m_manager = 0; + d->m_manager = nullptr; } void QOpenGLCustomShaderStage::setSource(const QByteArray& s) diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp index 462a4fdb3b..310006feaf 100644 --- a/src/gui/opengl/qopengldebug.cpp +++ b/src/gui/opengl/qopengldebug.cpp @@ -1108,14 +1108,14 @@ public: \internal */ QOpenGLDebugLoggerPrivate::QOpenGLDebugLoggerPrivate() - : glDebugMessageControl(0), - glDebugMessageInsert(0), - glDebugMessageCallback(0), - glGetDebugMessageLog(0), - glPushDebugGroup(0), - glPopDebugGroup(0), - oldDebugCallbackFunction(0), - context(0), + : glDebugMessageControl(nullptr), + glDebugMessageInsert(nullptr), + glDebugMessageCallback(nullptr), + glGetDebugMessageLog(nullptr), + glPushDebugGroup(nullptr), + glPopDebugGroup(nullptr), + oldDebugCallbackFunction(nullptr), + context(nullptr), maxMessageLength(0), loggingMode(QOpenGLDebugLogger::AsynchronousLogging), initialized(false), @@ -1228,7 +1228,7 @@ void QOpenGLDebugLoggerPrivate::controlDebugMessages(QOpenGLDebugMessage::Source const GLsizei idCount = ids.count(); // The GL_KHR_debug extension says that if idCount is 0, idPtr must be ignored. // Unfortunately, some bugged drivers do NOT ignore it, so pass NULL in case. - const GLuint * const idPtr = idCount ? ids.constData() : 0; + const GLuint * const idPtr = idCount ? ids.constData() : nullptr; for (GLenum source : glSources) for (GLenum type : glTypes) @@ -1247,7 +1247,7 @@ void QOpenGLDebugLoggerPrivate::_q_contextAboutToBeDestroyed() // Save the current context and its surface in case we need to set them back QOpenGLContext *currentContext = QOpenGLContext::currentContext(); - QSurface *currentSurface = 0; + QSurface *currentSurface = nullptr; QScopedPointer offscreenSurface; @@ -1275,7 +1275,7 @@ void QOpenGLDebugLoggerPrivate::_q_contextAboutToBeDestroyed() } QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed())); - context = 0; + context = nullptr; initialized = false; } @@ -1356,7 +1356,7 @@ bool QOpenGLDebugLogger::initialize() disconnect(d->context, SIGNAL(aboutToBeDestroyed()), this, SLOT(_q_contextAboutToBeDestroyed())); d->initialized = false; - d->context = 0; + d->context = nullptr; if (!context->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) return false; diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp index 1e5a10c99c..a569975486 100644 --- a/src/gui/opengl/qopenglengineshadermanager.cpp +++ b/src/gui/opengl/qopenglengineshadermanager.cpp @@ -72,7 +72,7 @@ public: void invalidateResource() override { delete m_shaders; - m_shaders = 0; + m_shaders = nullptr; } void freeResource(QOpenGLContext *) override @@ -94,7 +94,7 @@ public: shaders = new QOpenGLMultiGroupSharedResource; QOpenGLEngineSharedShadersResource *resource = shaders->value(context); - return resource ? resource->shaders() : 0; + return resource ? resource->shaders() : nullptr; } private: @@ -116,8 +116,8 @@ const char* QOpenGLEngineSharedShaders::qShaderSnippets[] = { }; QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context) - : blitShaderProg(0) - , simpleShaderProg(0) + : blitShaderProg(nullptr) + , simpleShaderProg(nullptr) { /* @@ -341,12 +341,12 @@ QOpenGLEngineSharedShaders::~QOpenGLEngineSharedShaders() if (blitShaderProg) { delete blitShaderProg; - blitShaderProg = 0; + blitShaderProg = nullptr; } if (simpleShaderProg) { delete simpleShaderProg; - simpleShaderProg = 0; + simpleShaderProg = nullptr; } } @@ -507,8 +507,8 @@ QOpenGLEngineShaderManager::QOpenGLEngineShaderManager(QOpenGLContext* context) opacityMode(NoOpacity), maskType(NoMask), compositionMode(QPainter::CompositionMode_SourceOver), - customSrcStage(0), - currentShaderProg(0) + customSrcStage(nullptr), + currentShaderProg(nullptr) { sharedShaders = QOpenGLEngineSharedShaders::shadersForContext(context); } @@ -627,7 +627,7 @@ void QOpenGLEngineShaderManager::removeCustomStage() { if (customSrcStage) customSrcStage->setInactive(); - customSrcStage = 0; + customSrcStage = nullptr; shaderProgNeedsChanging = true; } @@ -684,7 +684,7 @@ bool QOpenGLEngineShaderManager::useCorrectShaderProg() if (!shaderProgNeedsChanging) return false; - bool useCustomSrc = customSrcStage != 0; + bool useCustomSrc = customSrcStage != nullptr; if (useCustomSrc && srcPixelType != QOpenGLEngineShaderManager::ImageSrc && srcPixelType != Qt::TexturePattern) { useCustomSrc = false; qWarning("QOpenGLEngineShaderManager - Ignoring custom shader stage for non image src"); diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index bb0dbdc9bd..d7a6d32218 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -551,7 +551,7 @@ void QOpenGLFramebufferObjectPrivate::initTexture(int idx) pixelType = GL_UNSIGNED_SHORT; funcs.glTexImage2D(target, 0, color.internalFormat, color.size.width(), color.size.height(), 0, - GL_RGBA, pixelType, NULL); + GL_RGBA, pixelType, nullptr); if (format.mipmap()) { int width = color.size.width(); int height = color.size.height(); @@ -561,7 +561,7 @@ void QOpenGLFramebufferObjectPrivate::initTexture(int idx) height = qMax(1, height >> 1); ++level; funcs.glTexImage2D(target, level, color.internalFormat, width, height, 0, - GL_RGBA, pixelType, NULL); + GL_RGBA, pixelType, nullptr); } } funcs.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + idx, @@ -640,8 +640,8 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext stencil_buffer_guard->free(); } - depth_buffer_guard = 0; - stencil_buffer_guard = 0; + depth_buffer_guard = nullptr; + stencil_buffer_guard = nullptr; GLuint depth_buffer = 0; GLuint stencil_buffer = 0; @@ -1284,7 +1284,7 @@ GLuint QOpenGLFramebufferObject::takeTexture(int colorAttachmentIndex) id = guard ? guard->id() : 0; // Do not call free() on texture_guard, just null it out. // This way the texture will not be deleted when the guard is destroyed. - guard = 0; + guard = nullptr; } return id; } @@ -1564,7 +1564,7 @@ bool QOpenGLFramebufferObject::bindDefault() qWarning("QOpenGLFramebufferObject::bindDefault() called without current context."); #endif - return ctx != 0; + return ctx != nullptr; } /*! diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index 3e9eb3dd0a..11ca802ee6 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -182,7 +182,7 @@ struct QOpenGLFunctionsPrivateEx : public QOpenGLExtensionsPrivate, public QOpen Q_GLOBAL_STATIC(QOpenGLMultiGroupSharedResource, qt_gl_functions_resource) -static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = 0) +static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = nullptr) { if (!context) context = QOpenGLContext::currentContext(); @@ -200,7 +200,7 @@ static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = 0) \sa initializeOpenGLFunctions() */ QOpenGLFunctions::QOpenGLFunctions() - : d_ptr(0) + : d_ptr(nullptr) { } @@ -218,7 +218,7 @@ QOpenGLFunctions::QOpenGLFunctions() \sa initializeOpenGLFunctions() */ QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext *context) - : d_ptr(0) + : d_ptr(nullptr) { if (context && QOpenGLContextGroup::currentContextGroup() == context->shareGroup()) d_ptr = qt_gl_functions(context); diff --git a/src/gui/opengl/qopenglfunctions_1_0.cpp b/src/gui/opengl/qopenglfunctions_1_0.cpp index f017c68fd9..f9d93ce210 100644 --- a/src/gui/opengl/qopenglfunctions_1_0.cpp +++ b/src/gui/opengl/qopenglfunctions_1_0.cpp @@ -67,8 +67,8 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_1_0::QOpenGLFunctions_1_0() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_0_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_0_Deprecated(nullptr) { } @@ -98,7 +98,7 @@ bool QOpenGLFunctions_1_0::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_1_1.cpp b/src/gui/opengl/qopenglfunctions_1_1.cpp index a819d499f8..b0f7538d48 100644 --- a/src/gui/opengl/qopenglfunctions_1_1.cpp +++ b/src/gui/opengl/qopenglfunctions_1_1.cpp @@ -67,10 +67,10 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_1_1::QOpenGLFunctions_1_1() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) { } @@ -108,7 +108,7 @@ bool QOpenGLFunctions_1_1::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_1_2.cpp b/src/gui/opengl/qopenglfunctions_1_2.cpp index 61db2b4e0f..5f137b0237 100644 --- a/src/gui/opengl/qopenglfunctions_1_2.cpp +++ b/src/gui/opengl/qopenglfunctions_1_2.cpp @@ -67,12 +67,12 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_1_2::QOpenGLFunctions_1_2() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) { } @@ -118,7 +118,7 @@ bool QOpenGLFunctions_1_2::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_1_3.cpp b/src/gui/opengl/qopenglfunctions_1_3.cpp index acc223ea74..0b5ff2fee5 100644 --- a/src/gui/opengl/qopenglfunctions_1_3.cpp +++ b/src/gui/opengl/qopenglfunctions_1_3.cpp @@ -67,14 +67,14 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_1_3::QOpenGLFunctions_1_3() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) { } @@ -128,7 +128,7 @@ bool QOpenGLFunctions_1_3::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_1_4.cpp b/src/gui/opengl/qopenglfunctions_1_4.cpp index 8e2349dc08..9419c1aa85 100644 --- a/src/gui/opengl/qopenglfunctions_1_4.cpp +++ b/src/gui/opengl/qopenglfunctions_1_4.cpp @@ -67,16 +67,16 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_1_4::QOpenGLFunctions_1_4() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) { } @@ -138,7 +138,7 @@ bool QOpenGLFunctions_1_4::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_1_5.cpp b/src/gui/opengl/qopenglfunctions_1_5.cpp index cd81cf8b35..3fa7668a36 100644 --- a/src/gui/opengl/qopenglfunctions_1_5.cpp +++ b/src/gui/opengl/qopenglfunctions_1_5.cpp @@ -67,17 +67,17 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_1_5::QOpenGLFunctions_1_5() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) { } @@ -143,7 +143,7 @@ bool QOpenGLFunctions_1_5::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_2_0.cpp b/src/gui/opengl/qopenglfunctions_2_0.cpp index 97a8c72fa6..29eb055a1d 100644 --- a/src/gui/opengl/qopenglfunctions_2_0.cpp +++ b/src/gui/opengl/qopenglfunctions_2_0.cpp @@ -67,18 +67,18 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_2_0::QOpenGLFunctions_2_0() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) { } @@ -149,7 +149,7 @@ bool QOpenGLFunctions_2_0::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_2_1.cpp b/src/gui/opengl/qopenglfunctions_2_1.cpp index 00bdc1bbba..8a7170dd7d 100644 --- a/src/gui/opengl/qopenglfunctions_2_1.cpp +++ b/src/gui/opengl/qopenglfunctions_2_1.cpp @@ -67,19 +67,19 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_2_1::QOpenGLFunctions_2_1() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) { } @@ -154,7 +154,7 @@ bool QOpenGLFunctions_2_1::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_3_0.cpp b/src/gui/opengl/qopenglfunctions_3_0.cpp index 2c239dba1f..7d0e900659 100644 --- a/src/gui/opengl/qopenglfunctions_3_0.cpp +++ b/src/gui/opengl/qopenglfunctions_3_0.cpp @@ -67,20 +67,20 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_3_0::QOpenGLFunctions_3_0() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) , m_reserved_3_0_Deprecated(nullptr) { @@ -160,7 +160,7 @@ bool QOpenGLFunctions_3_0::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_3_1.cpp b/src/gui/opengl/qopenglfunctions_3_1.cpp index f62f555c8e..c25b124af8 100644 --- a/src/gui/opengl/qopenglfunctions_3_1.cpp +++ b/src/gui/opengl/qopenglfunctions_3_1.cpp @@ -67,16 +67,16 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_3_1::QOpenGLFunctions_3_1() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) { } @@ -138,7 +138,7 @@ bool QOpenGLFunctions_3_1::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp index ba7be2d893..3e4fd96dc2 100644 --- a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp @@ -67,22 +67,22 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_3_2_Compatibility::QOpenGLFunctions_3_2_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) , m_reserved_3_0_Deprecated(nullptr) { @@ -170,7 +170,7 @@ bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_3_2_core.cpp b/src/gui/opengl/qopenglfunctions_3_2_core.cpp index 4c1e3eb3da..ea89fc9e48 100644 --- a/src/gui/opengl/qopenglfunctions_3_2_core.cpp +++ b/src/gui/opengl/qopenglfunctions_3_2_core.cpp @@ -67,17 +67,17 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_3_2_Core::QOpenGLFunctions_3_2_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) { } @@ -143,7 +143,7 @@ bool QOpenGLFunctions_3_2_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp index c750c6e0cc..a26d7d99b1 100644 --- a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp @@ -67,25 +67,25 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_3_3_Compatibility::QOpenGLFunctions_3_3_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) - , d_3_3_Deprecated(0) + , d_3_3_Deprecated(nullptr) { } @@ -179,7 +179,7 @@ bool QOpenGLFunctions_3_3_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_3_3_core.cpp b/src/gui/opengl/qopenglfunctions_3_3_core.cpp index 5723509e32..277ad1eb14 100644 --- a/src/gui/opengl/qopenglfunctions_3_3_core.cpp +++ b/src/gui/opengl/qopenglfunctions_3_3_core.cpp @@ -67,18 +67,18 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_3_3_Core::QOpenGLFunctions_3_3_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) { } @@ -148,7 +148,7 @@ bool QOpenGLFunctions_3_3_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp index 6ae7643eb5..655f1e6fd4 100644 --- a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp @@ -67,26 +67,26 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_0_Compatibility::QOpenGLFunctions_4_0_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) - , d_3_3_Deprecated(0) + , d_3_3_Deprecated(nullptr) { } @@ -184,7 +184,7 @@ bool QOpenGLFunctions_4_0_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_0_core.cpp b/src/gui/opengl/qopenglfunctions_4_0_core.cpp index cd4fdb8b2b..60453d147c 100644 --- a/src/gui/opengl/qopenglfunctions_4_0_core.cpp +++ b/src/gui/opengl/qopenglfunctions_4_0_core.cpp @@ -67,19 +67,19 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_0_Core::QOpenGLFunctions_4_0_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) { } @@ -153,7 +153,7 @@ bool QOpenGLFunctions_4_0_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp index d104c74bc2..bdea8b5ba9 100644 --- a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp @@ -67,27 +67,27 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_1_Compatibility::QOpenGLFunctions_4_1_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) - , d_3_3_Deprecated(0) + , d_3_3_Deprecated(nullptr) { } @@ -189,7 +189,7 @@ bool QOpenGLFunctions_4_1_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_1_core.cpp b/src/gui/opengl/qopenglfunctions_4_1_core.cpp index 7527aba620..b21742d9c1 100644 --- a/src/gui/opengl/qopenglfunctions_4_1_core.cpp +++ b/src/gui/opengl/qopenglfunctions_4_1_core.cpp @@ -67,20 +67,20 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_1_Core::QOpenGLFunctions_4_1_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) { } @@ -158,7 +158,7 @@ bool QOpenGLFunctions_4_1_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp index a5b1b37495..41ab9ae762 100644 --- a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp @@ -67,28 +67,28 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_2_Compatibility::QOpenGLFunctions_4_2_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) - , d_3_3_Deprecated(0) + , d_3_3_Deprecated(nullptr) { } @@ -194,7 +194,7 @@ bool QOpenGLFunctions_4_2_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_2_core.cpp b/src/gui/opengl/qopenglfunctions_4_2_core.cpp index 1381236926..38dbe1b596 100644 --- a/src/gui/opengl/qopenglfunctions_4_2_core.cpp +++ b/src/gui/opengl/qopenglfunctions_4_2_core.cpp @@ -67,21 +67,21 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_2_Core::QOpenGLFunctions_4_2_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) { } @@ -163,7 +163,7 @@ bool QOpenGLFunctions_4_2_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp index 5c0c711d1c..1b23d08ee2 100644 --- a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp @@ -67,29 +67,29 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_3_Compatibility::QOpenGLFunctions_4_3_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) - , d_4_3_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) + , d_4_3_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) , m_reserved_2_0_Deprecated(nullptr) - , d_3_3_Deprecated(0) + , d_3_3_Deprecated(nullptr) { } @@ -199,7 +199,7 @@ bool QOpenGLFunctions_4_3_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_3_core.cpp b/src/gui/opengl/qopenglfunctions_4_3_core.cpp index 34460b841e..8a867471b8 100644 --- a/src/gui/opengl/qopenglfunctions_4_3_core.cpp +++ b/src/gui/opengl/qopenglfunctions_4_3_core.cpp @@ -67,22 +67,22 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_3_Core::QOpenGLFunctions_4_3_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) - , d_4_3_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) + , d_4_3_Core(nullptr) { } @@ -168,7 +168,7 @@ bool QOpenGLFunctions_4_3_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp index 907994a3c4..4fc4b50100 100644 --- a/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_4_compatibility.cpp @@ -67,29 +67,29 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_4_Compatibility::QOpenGLFunctions_4_4_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) - , d_4_3_Core(0) - , d_4_4_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) - , d_3_3_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) + , d_4_3_Core(nullptr) + , d_4_4_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) + , d_3_3_Deprecated(nullptr) { } @@ -203,7 +203,7 @@ bool QOpenGLFunctions_4_4_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_4_core.cpp b/src/gui/opengl/qopenglfunctions_4_4_core.cpp index 76c0323f6d..6169c7f455 100644 --- a/src/gui/opengl/qopenglfunctions_4_4_core.cpp +++ b/src/gui/opengl/qopenglfunctions_4_4_core.cpp @@ -67,23 +67,23 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_4_Core::QOpenGLFunctions_4_4_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) - , d_4_3_Core(0) - , d_4_4_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) + , d_4_3_Core(nullptr) + , d_4_4_Core(nullptr) { } @@ -173,7 +173,7 @@ bool QOpenGLFunctions_4_4_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp index c415bb06ff..02af443498 100644 --- a/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_5_compatibility.cpp @@ -67,31 +67,31 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_5_Compatibility::QOpenGLFunctions_4_5_Compatibility() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) - , d_4_3_Core(0) - , d_4_4_Core(0) - , d_4_5_Core(0) - , d_1_0_Deprecated(0) - , d_1_1_Deprecated(0) - , d_1_2_Deprecated(0) - , d_1_3_Deprecated(0) - , d_1_4_Deprecated(0) - , d_3_3_Deprecated(0) - , d_4_5_Deprecated(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) + , d_4_3_Core(nullptr) + , d_4_4_Core(nullptr) + , d_4_5_Core(nullptr) + , d_1_0_Deprecated(nullptr) + , d_1_1_Deprecated(nullptr) + , d_1_2_Deprecated(nullptr) + , d_1_3_Deprecated(nullptr) + , d_1_4_Deprecated(nullptr) + , d_3_3_Deprecated(nullptr) + , d_4_5_Deprecated(nullptr) { } @@ -213,7 +213,7 @@ bool QOpenGLFunctions_4_5_Compatibility::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglfunctions_4_5_core.cpp b/src/gui/opengl/qopenglfunctions_4_5_core.cpp index 4dfac3579c..9c0369e5f2 100644 --- a/src/gui/opengl/qopenglfunctions_4_5_core.cpp +++ b/src/gui/opengl/qopenglfunctions_4_5_core.cpp @@ -67,24 +67,24 @@ QT_BEGIN_NAMESPACE QOpenGLFunctions_4_5_Core::QOpenGLFunctions_4_5_Core() : QAbstractOpenGLFunctions() - , d_1_0_Core(0) - , d_1_1_Core(0) - , d_1_2_Core(0) - , d_1_3_Core(0) - , d_1_4_Core(0) - , d_1_5_Core(0) - , d_2_0_Core(0) - , d_2_1_Core(0) - , d_3_0_Core(0) - , d_3_1_Core(0) - , d_3_2_Core(0) - , d_3_3_Core(0) - , d_4_0_Core(0) - , d_4_1_Core(0) - , d_4_2_Core(0) - , d_4_3_Core(0) - , d_4_4_Core(0) - , d_4_5_Core(0) + , d_1_0_Core(nullptr) + , d_1_1_Core(nullptr) + , d_1_2_Core(nullptr) + , d_1_3_Core(nullptr) + , d_1_4_Core(nullptr) + , d_1_5_Core(nullptr) + , d_2_0_Core(nullptr) + , d_2_1_Core(nullptr) + , d_3_0_Core(nullptr) + , d_3_1_Core(nullptr) + , d_3_2_Core(nullptr) + , d_3_3_Core(nullptr) + , d_4_0_Core(nullptr) + , d_4_1_Core(nullptr) + , d_4_2_Core(nullptr) + , d_4_3_Core(nullptr) + , d_4_4_Core(nullptr) + , d_4_5_Core(nullptr) { } @@ -178,7 +178,7 @@ bool QOpenGLFunctions_4_5_Core::initializeOpenGLFunctions() { // Associate with private implementation, creating if necessary // Function pointers in the backends are resolved at creation time - QOpenGLVersionFunctionsBackend* d = 0; + QOpenGLVersionFunctionsBackend* d = nullptr; d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); d_1_0_Core = static_cast(d); d->refs.ref(); diff --git a/src/gui/opengl/qopenglpaintdevice.cpp b/src/gui/opengl/qopenglpaintdevice.cpp index 3a0c02feb0..3920a10467 100644 --- a/src/gui/opengl/qopenglpaintdevice.cpp +++ b/src/gui/opengl/qopenglpaintdevice.cpp @@ -171,7 +171,7 @@ QOpenGLPaintDevicePrivate::QOpenGLPaintDevicePrivate(const QSize &sz) , dpmy(qt_defaultDpiY() * 100. / 2.54) , devicePixelRatio(1.0) , flipped(false) - , engine(0) + , engine(nullptr) { } diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index 20cc2b5ae5..a82edbb073 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -881,7 +881,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path) Q_ASSERT(cache->ibo == 0); #else free(cache->vertices); - Q_ASSERT(cache->indices == 0); + Q_ASSERT(cache->indices == nullptr); #endif updateCache = true; } @@ -909,7 +909,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path) #else cache->vertices = (float *) malloc(floatSizeInBytes); memcpy(cache->vertices, vertexCoordinateArray.data(), floatSizeInBytes); - cache->indices = 0; + cache->indices = nullptr; #endif } @@ -1359,7 +1359,7 @@ void QOpenGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) return; QOpenGL2PaintEngineState *s = state(); - if (qt_pen_is_cosmetic(pen, state()->renderHints) && !qt_scaleForTransform(s->transform(), 0)) { + if (qt_pen_is_cosmetic(pen, state()->renderHints) && !qt_scaleForTransform(s->transform(), nullptr)) { // QTriangulatingStroker class is not meant to support cosmetically sheared strokes. QPaintEngineEx::stroke(path, pen); return; @@ -1427,7 +1427,7 @@ void QOpenGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &p QRectF bounds = path.controlPointRect().adjusted(-extra, -extra, extra, extra); fillStencilWithVertexArray(stroker.vertices(), stroker.vertexCount() / 2, - 0, 0, bounds, QOpenGL2PaintEngineExPrivate::TriStripStrokeFillMode); + nullptr, 0, bounds, QOpenGL2PaintEngineExPrivate::TriStripStrokeFillMode); funcs.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE); @@ -1772,7 +1772,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly QOpenGLTextureGlyphCache *cache = (QOpenGLTextureGlyphCache *) fe->glyphCache(cacheKey, glyphFormat, glyphCacheTransform); - if (!cache || cache->glyphFormat() != glyphFormat || cache->contextGroup() == 0) { + if (!cache || cache->glyphFormat() != glyphFormat || cache->contextGroup() == nullptr) { cache = new QOpenGLTextureGlyphCache(glyphFormat, glyphCacheTransform); fe->setGlyphCache(cacheKey, cache); recreateVertexArrays = true; @@ -1780,7 +1780,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly if (staticTextItem->userDataNeedsUpdate) { recreateVertexArrays = true; - } else if (staticTextItem->userData() == 0) { + } else if (staticTextItem->userData() == nullptr) { recreateVertexArrays = true; } else if (staticTextItem->userData()->type != QStaticTextUserData::OpenGLUserData) { recreateVertexArrays = true; @@ -1845,9 +1845,9 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly QOpenGL2PEXVertexArray *textureCoordinates = &textureCoordinateArray; if (staticTextItem->useBackendOptimizations) { - QOpenGLStaticTextUserData *userData = 0; + QOpenGLStaticTextUserData *userData = nullptr; - if (staticTextItem->userData() == 0 + if (staticTextItem->userData() == nullptr || staticTextItem->userData()->type != QStaticTextUserData::OpenGLUserData) { userData = new QOpenGLStaticTextUserData(); @@ -2273,12 +2273,12 @@ bool QOpenGL2PaintEngineEx::end() d->funcs.glUseProgram(0); d->transferMode(BrushDrawingMode); - ctx->d_func()->active_engine = 0; + ctx->d_func()->active_engine = nullptr; d->resetGLState(); delete d->shaderManager; - d->shaderManager = 0; + d->shaderManager = nullptr; d->currentBrush = QBrush(); #ifdef QT_OPENGL_CACHE_AS_VBOS diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index 4986ca573d..7e89d9c8d4 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -249,7 +249,7 @@ class QOpenGLShaderPrivate : public QObjectPrivate Q_DECLARE_PUBLIC(QOpenGLShader) public: QOpenGLShaderPrivate(QOpenGLContext *ctx, QOpenGLShader::ShaderType type) - : shaderGuard(0) + : shaderGuard(nullptr) , shaderType(type) , compiled(false) , glfuncs(new QOpenGLExtraFunctions(ctx)) @@ -374,8 +374,8 @@ bool QOpenGLShaderPrivate::compile(QOpenGLShader *q) // Get info and source code lengths GLint infoLogLength = 0; GLint sourceCodeLength = 0; - char *logBuffer = 0; - char *sourceCodeBuffer = 0; + char *logBuffer = nullptr; + char *sourceCodeBuffer = nullptr; // Get the compilation info log glfuncs->glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLogLength); @@ -425,7 +425,7 @@ void QOpenGLShaderPrivate::deleteShader() { if (shaderGuard) { shaderGuard->free(); - shaderGuard = 0; + shaderGuard = nullptr; } } @@ -783,13 +783,13 @@ class QOpenGLShaderProgramPrivate : public QObjectPrivate Q_DECLARE_PUBLIC(QOpenGLShaderProgram) public: QOpenGLShaderProgramPrivate() - : programGuard(0) + : programGuard(nullptr) , linked(false) , inited(false) , removingShaders(false) , glfuncs(new QOpenGLExtraFunctions) #ifndef QT_OPENGL_ES_2 - , tessellationFuncs(0) + , tessellationFuncs(nullptr) #endif , linkBinaryRecursion(false) { diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 61a6202017..cf4a8dee8d 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE QOpenGLTexturePrivate::QOpenGLTexturePrivate(QOpenGLTexture::Target textureTarget, QOpenGLTexture *qq) : q_ptr(qq), - context(0), + context(nullptr), target(textureTarget), textureId(0), format(QOpenGLTexture::NoFormat), @@ -82,8 +82,8 @@ QOpenGLTexturePrivate::QOpenGLTexturePrivate(QOpenGLTexture::Target textureTarge textureView(false), autoGenerateMipMaps(true), storageAllocated(false), - texFuncs(0), - functions(0) + texFuncs(nullptr), + functions(nullptr) { dimensions[0] = dimensions[1] = dimensions[2] = 1; @@ -208,8 +208,8 @@ void QOpenGLTexturePrivate::destroy() functions->glDeleteTextures(1, &textureId); - context = 0; - functions = 0; + context = nullptr; + functions = nullptr; textureId = 0; format = QOpenGLTexture::NoFormat; formatClass = QOpenGLTexture::NoFormatClass; @@ -231,7 +231,7 @@ void QOpenGLTexturePrivate::destroy() textureView = false; autoGenerateMipMaps = true; storageAllocated = false; - texFuncs = 0; + texFuncs = nullptr; swizzleMask[0] = QOpenGLTexture::RedValue; swizzleMask[1] = QOpenGLTexture::GreenValue; @@ -1141,7 +1141,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p texFuncs->glTextureImage1D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), 0, - pixelFormat, pixelType, 0); + pixelFormat, pixelType, nullptr); } else { qWarning("1D textures are not supported"); return; @@ -1156,7 +1156,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p mipLevelSize(level, dimensions[0]), layers, 0, - pixelFormat, pixelType, 0); + pixelFormat, pixelType, nullptr); } else { qWarning("1D array textures are not supported"); return; @@ -1170,7 +1170,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 0, - pixelFormat, pixelType, 0); + pixelFormat, pixelType, nullptr); break; case QOpenGLTexture::TargetCubeMap: { @@ -1190,7 +1190,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 0, - pixelFormat, pixelType, 0); + pixelFormat, pixelType, nullptr); } } break; @@ -1204,7 +1204,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p mipLevelSize(level, dimensions[1]), layers, 0, - pixelFormat, pixelType, 0); + pixelFormat, pixelType, nullptr); } else { qWarning("Array textures are not supported"); return; @@ -1220,7 +1220,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p mipLevelSize(level, dimensions[1]), 6 * layers, 0, - pixelFormat, pixelType, 0); + pixelFormat, pixelType, nullptr); } else { qWarning("Cubemap Array textures are not supported"); return; @@ -1235,7 +1235,7 @@ void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat p mipLevelSize(level, dimensions[1]), mipLevelSize(level, dimensions[2]), 0, - pixelFormat, pixelType, 0); + pixelFormat, pixelType, nullptr); } else { qWarning("3D textures are not supported"); return; @@ -1924,7 +1924,7 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target if (!viewTargetCompatible) { qWarning("QOpenGLTexture::createTextureView(): Incompatible source and view targets"); - return 0; + return nullptr; } // Check the formats are compatible @@ -2057,7 +2057,7 @@ QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target if (!viewFormatCompatible) { qWarning("QOpenGLTexture::createTextureView(): Incompatible source and view formats"); - return 0; + return nullptr; } @@ -3387,7 +3387,7 @@ QOpenGLTexture *QOpenGLTexture::createTextureView(Target target, Q_D(const QOpenGLTexture); if (!isStorageAllocated()) { qWarning("Cannot set create a texture view of a texture that does not have storage allocated."); - return 0; + return nullptr; } Q_ASSERT(maximumMipmapLevel >= minimumMipmapLevel); Q_ASSERT(maximumLayer >= minimumLayer); diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp index 490dc99749..41027d26e0 100644 --- a/src/gui/opengl/qopengltextureglyphcache.cpp +++ b/src/gui/opengl/qopengltextureglyphcache.cpp @@ -55,9 +55,9 @@ static int next_qopengltextureglyphcache_serial_number() QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix, const QColor &color) : QImageTextureGlyphCache(format, matrix, color) - , m_textureResource(0) - , pex(0) - , m_blitProgram(0) + , m_textureResource(nullptr) + , pex(nullptr) + , m_blitProgram(nullptr) , m_filterMode(Nearest) , m_serialNumber(next_qopengltextureglyphcache_serial_number()) , m_buffer(QOpenGLBuffer::VertexBuffer) @@ -102,7 +102,7 @@ static inline bool isCoreProfile() void QOpenGLTextureGlyphCache::createTextureData(int width, int height) { QOpenGLContext *ctx = const_cast(QOpenGLContext::currentContext()); - if (ctx == 0) { + if (ctx == nullptr) { qWarning("QOpenGLTextureGlyphCache::createTextureData: Called with no context"); return; } @@ -121,7 +121,7 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height) if (m_textureResource && !m_textureResource->m_texture) { delete m_textureResource; - m_textureResource = 0; + m_textureResource = nullptr; } if (!m_textureResource) @@ -276,7 +276,7 @@ static void load_glyph_image_region_to_texture(QOpenGLContext *ctx, void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) { QOpenGLContext *ctx = QOpenGLContext::currentContext(); - if (ctx == 0) { + if (ctx == nullptr) { qWarning("QOpenGLTextureGlyphCache::resizeTextureData: Called with no context"); return; } @@ -313,7 +313,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) funcs->glGenTextures(1, &tmp_texture); funcs->glBindTexture(GL_TEXTURE_2D, tmp_texture); funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, oldWidth, oldHeight, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + GL_RGBA, GL_UNSIGNED_BYTE, nullptr); funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); @@ -326,7 +326,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) funcs->glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT); funcs->glBindTexture(GL_TEXTURE_2D, oldTexture); - if (pex != 0) + if (pex != nullptr) pex->transferMode(BrushDrawingMode); funcs->glDisable(GL_STENCIL_TEST); @@ -336,9 +336,9 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) funcs->glViewport(0, 0, oldWidth, oldHeight); - QOpenGLShaderProgram *blitProgram = 0; - if (pex == 0) { - if (m_blitProgram == 0) { + QOpenGLShaderProgram *blitProgram = nullptr; + if (pex == nullptr) { + if (m_blitProgram == nullptr) { m_blitProgram = new QOpenGLShaderProgram; const bool isCoreProfile = ctx->format().profile() == QSurfaceFormat::CoreProfile; @@ -408,7 +408,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) funcs->glBindFramebuffer(GL_FRAMEBUFFER, (GLuint)oldFbo); - if (pex != 0) { + if (pex != nullptr) { funcs->glViewport(0, 0, pex->width, pex->height); pex->updateClipScissorTest(); } else { @@ -424,7 +424,7 @@ void QOpenGLTextureGlyphCache::resizeTextureData(int width, int height) void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition) { QOpenGLContext *ctx = QOpenGLContext::currentContext(); - if (ctx == 0) { + if (ctx == nullptr) { qWarning("QOpenGLTextureGlyphCache::fillTexture: Called with no context"); return; } @@ -447,7 +447,7 @@ int QOpenGLTextureGlyphCache::glyphPadding() const int QOpenGLTextureGlyphCache::maxTextureWidth() const { QOpenGLContext *ctx = const_cast(QOpenGLContext::currentContext()); - if (ctx == 0) + if (ctx == nullptr) return QImageTextureGlyphCache::maxTextureWidth(); else return ctx->d_func()->maxTextureSize(); @@ -456,7 +456,7 @@ int QOpenGLTextureGlyphCache::maxTextureWidth() const int QOpenGLTextureGlyphCache::maxTextureHeight() const { QOpenGLContext *ctx = const_cast(QOpenGLContext::currentContext()); - if (ctx == 0) + if (ctx == nullptr) return QImageTextureGlyphCache::maxTextureHeight(); if (ctx->d_func()->workaround_brokenTexSubImage) @@ -469,10 +469,10 @@ void QOpenGLTextureGlyphCache::clear() { if (m_textureResource) m_textureResource->free(); - m_textureResource = 0; + m_textureResource = nullptr; delete m_blitProgram; - m_blitProgram = 0; + m_blitProgram = nullptr; m_w = 0; m_h = 0; diff --git a/src/gui/opengl/qopengltimerquery.cpp b/src/gui/opengl/qopengltimerquery.cpp index afd2e7887a..a4e10b42f7 100644 --- a/src/gui/opengl/qopengltimerquery.cpp +++ b/src/gui/opengl/qopengltimerquery.cpp @@ -77,8 +77,8 @@ class QOpenGLTimerQueryPrivate : public QObjectPrivate public: QOpenGLTimerQueryPrivate() : QObjectPrivate(), - context(0), - ext(0), + context(nullptr), + ext(nullptr), timeInterval(0), timer(0) { @@ -168,7 +168,7 @@ void QOpenGLTimerQueryPrivate::destroy() core->glDeleteQueries(1, &timer); timer = 0; - context = 0; + context = nullptr; } // GL_TIME_ELAPSED_EXT is not defined on OS X 10.6 @@ -310,14 +310,14 @@ QOpenGLTimerQuery::~QOpenGLTimerQuery() QOpenGLContext* ctx = QOpenGLContext::currentContext(); Q_D(QOpenGLTimerQuery); - QOpenGLContext *oldContext = 0; + QOpenGLContext *oldContext = nullptr; if (d->context != ctx) { oldContext = ctx; if (d->context->makeCurrent(oldContext->surface())) { ctx = d->context; } else { qWarning("QOpenGLTimerQuery::~QOpenGLTimerQuery() failed to make query objects's context current"); - ctx = 0; + ctx = nullptr; } } @@ -468,9 +468,9 @@ public: : QObjectPrivate(), timers(), timeSamples(), - context(0), - core(0), - ext(0), + context(nullptr), + core(nullptr), + ext(nullptr), requestedSampleCount(2), currentSample(-1), timerQueryActive(false) @@ -556,10 +556,10 @@ void QOpenGLTimeMonitorPrivate::destroy() core->glDeleteQueries(timers.size(), timers.data()); timers.clear(); delete core; - core = 0; + core = nullptr; delete ext; - ext = 0; - context = 0; + ext = nullptr; + context = nullptr; } void QOpenGLTimeMonitorPrivate::recordSample() @@ -701,14 +701,14 @@ QOpenGLTimeMonitor::~QOpenGLTimeMonitor() QOpenGLContext* ctx = QOpenGLContext::currentContext(); Q_D(QOpenGLTimeMonitor); - QOpenGLContext *oldContext = 0; + QOpenGLContext *oldContext = nullptr; if (d->context != ctx) { oldContext = ctx; if (d->context->makeCurrent(oldContext->surface())) { ctx = d->context; } else { qWarning("QOpenGLTimeMonitor::~QOpenGLTimeMonitor() failed to make time monitor's context current"); - ctx = 0; + ctx = nullptr; } } diff --git a/src/gui/opengl/qopenglversionfunctions.cpp b/src/gui/opengl/qopenglversionfunctions.cpp index a3d3bb6bd1..5a108335a9 100644 --- a/src/gui/opengl/qopenglversionfunctions.cpp +++ b/src/gui/opengl/qopenglversionfunctions.cpp @@ -68,7 +68,7 @@ void CLASS::init() \ } QOpenGLVersionFunctionsStorage::QOpenGLVersionFunctionsStorage() - : backends(0) + : backends(nullptr) { } diff --git a/src/gui/opengl/qopenglversionfunctionsfactory.cpp b/src/gui/opengl/qopenglversionfunctionsfactory.cpp index fff5eea29c..ca7daedf34 100644 --- a/src/gui/opengl/qopenglversionfunctionsfactory.cpp +++ b/src/gui/opengl/qopenglversionfunctionsfactory.cpp @@ -153,7 +153,7 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVe else if (major == 1 && minor == 0) return new QOpenGLFunctions_1_0; } - return 0; + return nullptr; #else Q_UNUSED(versionProfile); return new QOpenGLFunctions_ES2; diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp index f0837aff96..f15fe06ee8 100644 --- a/src/gui/opengl/qopenglvertexarrayobject.cpp +++ b/src/gui/opengl/qopenglvertexarrayobject.cpp @@ -101,7 +101,7 @@ public: QOpenGLVertexArrayObjectPrivate() : vao(0) , vaoFuncsType(NotSupported) - , context(0) + , context(nullptr) { } @@ -167,7 +167,7 @@ bool QOpenGLVertexArrayObjectPrivate::create() vaoFuncs.helper->glGenVertexArrays(1, &vao); } } else { - vaoFuncs.core_3_0 = 0; + vaoFuncs.core_3_0 = nullptr; vaoFuncsType = NotSupported; QSurfaceFormat format = ctx->format(); #ifndef QT_OPENGL_ES_2 @@ -200,17 +200,17 @@ void QOpenGLVertexArrayObjectPrivate::destroy() Q_Q(QOpenGLVertexArrayObject); QOpenGLContext *ctx = QOpenGLContext::currentContext(); - QOpenGLContext *oldContext = 0; - QSurface *oldContextSurface = 0; + QOpenGLContext *oldContext = nullptr; + QSurface *oldContextSurface = nullptr; QScopedPointer offscreenSurface; if (context && context != ctx) { oldContext = ctx; - oldContextSurface = ctx ? ctx->surface() : 0; + oldContextSurface = ctx ? ctx->surface() : nullptr; // Before going through the effort of creating an offscreen surface // check that we are on the GUI thread because otherwise many platforms // will not able to create that offscreen surface. if (QThread::currentThread() != qGuiApp->thread()) { - ctx = 0; + ctx = nullptr; } else { // Cannot just make the current surface current again with another context. // The format may be incompatible and some platforms (iOS) may impose @@ -223,14 +223,14 @@ void QOpenGLVertexArrayObjectPrivate::destroy() ctx = context; } else { qWarning("QOpenGLVertexArrayObject::destroy() failed to make VAO's context current"); - ctx = 0; + ctx = nullptr; } } } if (context) { QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed())); - context = 0; + context = nullptr; } if (vao && ctx) { -- cgit v1.2.3