From b08daaedd45457b775cb90d2c2650510daff1c8d Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 20 Dec 2011 21:39:12 +0100 Subject: Remove all non-inline of qMalloc/qFree/qRealloc. We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira Reviewed-by: Bradley T. Hughes --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp') diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 388c3a36f9..85773fa3cc 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -674,8 +674,8 @@ void QGL2PaintEngineExPrivate::cleanupVectorPath(QPaintEngineEx *engine, void *d d->unusedIBOSToClean << c->ibo; #else Q_UNUSED(engine); - qFree(c->vertices); - qFree(c->indices); + free(c->vertices); + free(c->indices); #endif delete c; } @@ -720,7 +720,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) cache->vbo = 0; Q_ASSERT(cache->ibo == 0); #else - qFree(cache->vertices); + free(cache->vertices); Q_ASSERT(cache->indices == 0); #endif updateCache = true; @@ -748,7 +748,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) glBufferData(GL_ARRAY_BUFFER, floatSizeInBytes, vertexCoordinateArray.data(), GL_STATIC_DRAW); cache->ibo = 0; #else - cache->vertices = (float *) qMalloc(floatSizeInBytes); + cache->vertices = (float *) malloc(floatSizeInBytes); memcpy(cache->vertices, vertexCoordinateArray.data(), floatSizeInBytes); cache->indices = 0; #endif @@ -800,8 +800,8 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) glDeleteBuffers(1, &cache->vbo); glDeleteBuffers(1, &cache->ibo); #else - qFree(cache->vertices); - qFree(cache->indices); + free(cache->vertices); + free(cache->indices); #endif updateCache = true; } @@ -836,12 +836,12 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) vertices[i] = float(inverseScale * polys.vertices.at(i)); glBufferData(GL_ARRAY_BUFFER, sizeof(float) * vertices.size(), vertices.data(), GL_STATIC_DRAW); #else - cache->vertices = (float *) qMalloc(sizeof(float) * polys.vertices.size()); + cache->vertices = (float *) malloc(sizeof(float) * polys.vertices.size()); if (polys.indices.type() == QVertexIndexVector::UnsignedInt) { - cache->indices = (quint32 *) qMalloc(sizeof(quint32) * polys.indices.size()); + cache->indices = (quint32 *) malloc(sizeof(quint32) * polys.indices.size()); memcpy(cache->indices, polys.indices.data(), sizeof(quint32) * polys.indices.size()); } else { - cache->indices = (quint16 *) qMalloc(sizeof(quint16) * polys.indices.size()); + cache->indices = (quint16 *) malloc(sizeof(quint16) * polys.indices.size()); memcpy(cache->indices, polys.indices.data(), sizeof(quint16) * polys.indices.size()); } for (int i = 0; i < polys.vertices.size(); ++i) -- cgit v1.2.3