summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglpaintengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopenglpaintengine.cpp')
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp20
1 files changed, 10 insertions, 10 deletions
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