diff options
Diffstat (limited to 'src/gui/opengl')
21 files changed, 50 insertions, 50 deletions
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index 7e663d48bb..3a476978e7 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -143,7 +143,7 @@ typedef QJsonArray::ConstIterator JsonArrayConstIt; static inline bool contains(const QJsonArray &haystack, unsigned needle) { for (JsonArrayConstIt it = haystack.constBegin(), cend = haystack.constEnd(); it != cend; ++it) { - if (needle == it->toString().toUInt(Q_NULLPTR, /* base */ 0)) + if (needle == it->toString().toUInt(nullptr, /* base */ 0)) return true; } return false; @@ -331,7 +331,7 @@ static bool matches(const QJsonObject &object, const QJsonValue vendorV = object.value(QLatin1String("vendor_id")); if (vendorV.isString()) { - if (gpu.vendorId != vendorV.toString().toUInt(Q_NULLPTR, /* base */ 0)) + if (gpu.vendorId != vendorV.toString().toUInt(nullptr, /* base */ 0)) return false; } else { if (object.contains(QLatin1String("gl_vendor"))) { diff --git a/src/gui/opengl/qopenglbuffer.h b/src/gui/opengl/qopenglbuffer.h index f2dfec3bb4..a810783731 100644 --- a/src/gui/opengl/qopenglbuffer.h +++ b/src/gui/opengl/qopenglbuffer.h @@ -124,7 +124,7 @@ public: void write(int offset, const void *data, int count); void allocate(const void *data, int count); - inline void allocate(int count) { allocate(Q_NULLPTR, count); } + inline void allocate(int count) { allocate(nullptr, count); } void *map(QOpenGLBuffer::Access access); void *mapRange(int offset, int count, QOpenGLBuffer::RangeAccessFlags access); diff --git a/src/gui/opengl/qopengldebug.h b/src/gui/opengl/qopengldebug.h index 6b10c36291..556ec175e1 100644 --- a/src/gui/opengl/qopengldebug.h +++ b/src/gui/opengl/qopengldebug.h @@ -167,7 +167,7 @@ public: }; Q_ENUM(LoggingMode) - explicit QOpenGLDebugLogger(QObject *parent = Q_NULLPTR); + explicit QOpenGLDebugLogger(QObject *parent = nullptr); ~QOpenGLDebugLogger(); bool initialize(); diff --git a/src/gui/opengl/qopenglextrafunctions.h b/src/gui/opengl/qopenglextrafunctions.h index 81716fb8d3..a68e269065 100644 --- a/src/gui/opengl/qopenglextrafunctions.h +++ b/src/gui/opengl/qopenglextrafunctions.h @@ -511,7 +511,7 @@ public: void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); private: - static bool isInitialized(const QOpenGLExtraFunctionsPrivate *d) { return d != Q_NULLPTR; } + static bool isInitialized(const QOpenGLExtraFunctionsPrivate *d) { return d != nullptr; } }; diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index b56bcd0866..628475a90a 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -953,7 +953,7 @@ QOpenGLFramebufferObject::~QOpenGLFramebufferObject() QOpenGLContextPrivate *contextPrv = QOpenGLContextPrivate::get(QOpenGLContext::currentContext()); if (contextPrv && contextPrv->qgl_current_fbo == this) { contextPrv->qgl_current_fbo_invalid = true; - contextPrv->qgl_current_fbo = Q_NULLPTR; + contextPrv->qgl_current_fbo = nullptr; } } @@ -1116,7 +1116,7 @@ bool QOpenGLFramebufferObject::release() QOpenGLContextPrivate *contextPrv = QOpenGLContextPrivate::get(current); contextPrv->qgl_current_fbo_invalid = true; - contextPrv->qgl_current_fbo = Q_NULLPTR; + contextPrv->qgl_current_fbo = nullptr; } return true; @@ -1472,7 +1472,7 @@ bool QOpenGLFramebufferObject::bindDefault() if (ctx) { ctx->functions()->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject()); QOpenGLContextPrivate::get(ctx)->qgl_current_fbo_invalid = true; - QOpenGLContextPrivate::get(ctx)->qgl_current_fbo = Q_NULLPTR; + QOpenGLContextPrivate::get(ctx)->qgl_current_fbo = nullptr; } #ifdef QT_DEBUG else diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h index 0a5de2c9af..273ceaddc0 100644 --- a/src/gui/opengl/qopenglfunctions.h +++ b/src/gui/opengl/qopenglfunctions.h @@ -413,7 +413,7 @@ public: protected: QOpenGLFunctionsPrivate *d_ptr; - static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != Q_NULLPTR; } + static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != nullptr; } }; Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLFunctions::OpenGLFeatures) diff --git a/src/gui/opengl/qopenglfunctions_2_0.cpp b/src/gui/opengl/qopenglfunctions_2_0.cpp index c175b13c5b..212723aa00 100644 --- a/src/gui/opengl/qopenglfunctions_2_0.cpp +++ b/src/gui/opengl/qopenglfunctions_2_0.cpp @@ -79,7 +79,7 @@ QOpenGLFunctions_2_0::QOpenGLFunctions_2_0() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) { } diff --git a/src/gui/opengl/qopenglfunctions_2_1.cpp b/src/gui/opengl/qopenglfunctions_2_1.cpp index 4e77efd121..b8b255014c 100644 --- a/src/gui/opengl/qopenglfunctions_2_1.cpp +++ b/src/gui/opengl/qopenglfunctions_2_1.cpp @@ -80,7 +80,7 @@ QOpenGLFunctions_2_1::QOpenGLFunctions_2_1() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) { } diff --git a/src/gui/opengl/qopenglfunctions_3_0.cpp b/src/gui/opengl/qopenglfunctions_3_0.cpp index 09e3ad09ef..4972c03b1e 100644 --- a/src/gui/opengl/qopenglfunctions_3_0.cpp +++ b/src/gui/opengl/qopenglfunctions_3_0.cpp @@ -81,8 +81,8 @@ QOpenGLFunctions_3_0::QOpenGLFunctions_3_0() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) - , m_reserved_3_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) + , m_reserved_3_0_Deprecated(nullptr) { } diff --git a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp index b90a123bfe..709f65edf8 100644 --- a/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp @@ -83,8 +83,8 @@ QOpenGLFunctions_3_2_Compatibility::QOpenGLFunctions_3_2_Compatibility() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) - , m_reserved_3_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) + , m_reserved_3_0_Deprecated(nullptr) { } diff --git a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp index c585f0fc7c..b034391c86 100644 --- a/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_3_3_compatibility.cpp @@ -84,7 +84,7 @@ QOpenGLFunctions_3_3_Compatibility::QOpenGLFunctions_3_3_Compatibility() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) , d_3_3_Deprecated(0) { } diff --git a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp index b5c423ef0c..4fe4526efc 100644 --- a/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp @@ -85,7 +85,7 @@ QOpenGLFunctions_4_0_Compatibility::QOpenGLFunctions_4_0_Compatibility() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) , d_3_3_Deprecated(0) { } diff --git a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp index 72c60c74b7..41ecb4672a 100644 --- a/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_1_compatibility.cpp @@ -86,7 +86,7 @@ QOpenGLFunctions_4_1_Compatibility::QOpenGLFunctions_4_1_Compatibility() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) , d_3_3_Deprecated(0) { } diff --git a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp index 8398ef0948..fcc049c67b 100644 --- a/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_2_compatibility.cpp @@ -87,7 +87,7 @@ QOpenGLFunctions_4_2_Compatibility::QOpenGLFunctions_4_2_Compatibility() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) , d_3_3_Deprecated(0) { } diff --git a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp index 19e67c6331..131ebc810f 100644 --- a/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp +++ b/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp @@ -88,7 +88,7 @@ QOpenGLFunctions_4_3_Compatibility::QOpenGLFunctions_4_3_Compatibility() , d_1_2_Deprecated(0) , d_1_3_Deprecated(0) , d_1_4_Deprecated(0) - , m_reserved_2_0_Deprecated(Q_NULLPTR) + , m_reserved_2_0_Deprecated(nullptr) , d_3_3_Deprecated(0) { } diff --git a/src/gui/opengl/qopenglshaderprogram.h b/src/gui/opengl/qopenglshaderprogram.h index fd4d82ecf9..84eb8d6956 100644 --- a/src/gui/opengl/qopenglshaderprogram.h +++ b/src/gui/opengl/qopenglshaderprogram.h @@ -79,7 +79,7 @@ public: }; Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit) - explicit QOpenGLShader(QOpenGLShader::ShaderType type, QObject *parent = Q_NULLPTR); + explicit QOpenGLShader(QOpenGLShader::ShaderType type, QObject *parent = nullptr); virtual ~QOpenGLShader(); QOpenGLShader::ShaderType shaderType() const; @@ -96,7 +96,7 @@ public: GLuint shaderId() const; - static bool hasOpenGLShaders(ShaderType type, QOpenGLContext *context = Q_NULLPTR); + static bool hasOpenGLShaders(ShaderType type, QOpenGLContext *context = nullptr); private: friend class QOpenGLShaderProgram; @@ -114,7 +114,7 @@ class Q_GUI_EXPORT QOpenGLShaderProgram : public QObject { Q_OBJECT public: - explicit QOpenGLShaderProgram(QObject *parent = Q_NULLPTR); + explicit QOpenGLShaderProgram(QObject *parent = nullptr); virtual ~QOpenGLShaderProgram(); bool addShader(QOpenGLShader *shader); @@ -306,7 +306,7 @@ public: void setUniformValueArray(const char *name, const QMatrix4x3 *values, int count); void setUniformValueArray(const char *name, const QMatrix4x4 *values, int count); - static bool hasOpenGLShaderPrograms(QOpenGLContext *context = Q_NULLPTR); + static bool hasOpenGLShaderPrograms(QOpenGLContext *context = nullptr); private Q_SLOTS: void shaderDestroyed(); diff --git a/src/gui/opengl/qopengltexture.h b/src/gui/opengl/qopengltexture.h index 12d9b91603..c0c5283374 100644 --- a/src/gui/opengl/qopengltexture.h +++ b/src/gui/opengl/qopengltexture.h @@ -459,60 +459,60 @@ public: #if QT_DEPRECATED_SINCE(5, 3) QT_DEPRECATED void setData(int mipLevel, int layer, CubeMapFace cubeFace, PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + void *data, const QOpenGLPixelTransferOptions * const options = nullptr); QT_DEPRECATED void setData(int mipLevel, int layer, PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + void *data, const QOpenGLPixelTransferOptions * const options = nullptr); QT_DEPRECATED void setData(int mipLevel, PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + void *data, const QOpenGLPixelTransferOptions * const options = nullptr); QT_DEPRECATED void setData(PixelFormat sourceFormat, PixelType sourceType, - void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + void *data, const QOpenGLPixelTransferOptions * const options = nullptr); #endif // QT_DEPRECATED_SINCE(5, 3) void setData(int mipLevel, int layer, CubeMapFace cubeFace, PixelFormat sourceFormat, PixelType sourceType, - const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const void *data, const QOpenGLPixelTransferOptions * const options = nullptr); void setData(int mipLevel, int layer, int layerCount, CubeMapFace cubeFace, PixelFormat sourceFormat, PixelType sourceType, - const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const void *data, const QOpenGLPixelTransferOptions * const options = nullptr); void setData(int mipLevel, int layer, PixelFormat sourceFormat, PixelType sourceType, - const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const void *data, const QOpenGLPixelTransferOptions * const options = nullptr); void setData(int mipLevel, PixelFormat sourceFormat, PixelType sourceType, - const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const void *data, const QOpenGLPixelTransferOptions * const options = nullptr); void setData(PixelFormat sourceFormat, PixelType sourceType, - const void *data, const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const void *data, const QOpenGLPixelTransferOptions * const options = nullptr); // Compressed data upload // ### Qt 6: remove the non-const void * overloads #if QT_DEPRECATED_SINCE(5, 3) QT_DEPRECATED void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace, int dataSize, void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); QT_DEPRECATED void setCompressedData(int mipLevel, int layer, int dataSize, void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); QT_DEPRECATED void setCompressedData(int mipLevel, int dataSize, void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); QT_DEPRECATED void setCompressedData(int dataSize, void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); #endif // QT_DEPRECATED_SINCE(5, 3) void setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace, int dataSize, const void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); void setCompressedData(int mipLevel, int layer, int layerCount, CubeMapFace cubeFace, int dataSize, const void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); void setCompressedData(int mipLevel, int layer, int dataSize, const void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); void setCompressedData(int mipLevel, int dataSize, const void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); void setCompressedData(int dataSize, const void *data, - const QOpenGLPixelTransferOptions * const options = Q_NULLPTR); + const QOpenGLPixelTransferOptions * const options = nullptr); // Helpful overloads for setData void setData(const QImage& image, MipMapGeneration genMipMaps = GenerateMipMaps); diff --git a/src/gui/opengl/qopengltimerquery.h b/src/gui/opengl/qopengltimerquery.h index 7b9ab850e2..27da74a3fb 100644 --- a/src/gui/opengl/qopengltimerquery.h +++ b/src/gui/opengl/qopengltimerquery.h @@ -56,7 +56,7 @@ class Q_GUI_EXPORT QOpenGLTimerQuery : public QObject Q_OBJECT public: - explicit QOpenGLTimerQuery(QObject *parent = Q_NULLPTR); + explicit QOpenGLTimerQuery(QObject *parent = nullptr); ~QOpenGLTimerQuery(); bool create(); @@ -84,7 +84,7 @@ class Q_GUI_EXPORT QOpenGLTimeMonitor : public QObject Q_OBJECT public: - explicit QOpenGLTimeMonitor(QObject *parent = Q_NULLPTR); + explicit QOpenGLTimeMonitor(QObject *parent = nullptr); ~QOpenGLTimeMonitor(); void setSampleCount(int sampleCount); diff --git a/src/gui/opengl/qopenglversionfunctions.h b/src/gui/opengl/qopenglversionfunctions.h index 63209cf392..3af1ed0466 100644 --- a/src/gui/opengl/qopenglversionfunctions.h +++ b/src/gui/opengl/qopenglversionfunctions.h @@ -193,7 +193,7 @@ class QAbstractOpenGLFunctionsPrivate { public: QAbstractOpenGLFunctionsPrivate() - : owningContext(Q_NULLPTR), + : owningContext(nullptr), initialized(false) {} diff --git a/src/gui/opengl/qopenglvertexarrayobject.h b/src/gui/opengl/qopenglvertexarrayobject.h index a8153ea40b..b81ae6a2a9 100644 --- a/src/gui/opengl/qopenglvertexarrayobject.h +++ b/src/gui/opengl/qopenglvertexarrayobject.h @@ -56,7 +56,7 @@ class Q_GUI_EXPORT QOpenGLVertexArrayObject : public QObject Q_OBJECT public: - explicit QOpenGLVertexArrayObject(QObject* parent = Q_NULLPTR); + explicit QOpenGLVertexArrayObject(QObject* parent = nullptr); ~QOpenGLVertexArrayObject(); bool create(); diff --git a/src/gui/opengl/qopenglvertexarrayobject_p.h b/src/gui/opengl/qopenglvertexarrayobject_p.h index 937921765b..fd3a6f0f89 100644 --- a/src/gui/opengl/qopenglvertexarrayobject_p.h +++ b/src/gui/opengl/qopenglvertexarrayobject_p.h @@ -70,10 +70,10 @@ class QOpenGLVertexArrayObjectHelper public: explicit inline QOpenGLVertexArrayObjectHelper(QOpenGLContext *context) - : GenVertexArrays(Q_NULLPTR) - , DeleteVertexArrays(Q_NULLPTR) - , BindVertexArray(Q_NULLPTR) - , IsVertexArray(Q_NULLPTR) + : GenVertexArrays(nullptr) + , DeleteVertexArrays(nullptr) + , BindVertexArray(nullptr) + , IsVertexArray(nullptr) { qtInitializeVertexArrayObjectHelper(this, context); } |