diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qtiffhandler.cpp | 18 | ||||
-rw-r--r-- | src/gui/opengl/qopenglpaintengine.cpp | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/image/qtiffhandler.cpp b/src/gui/image/qtiffhandler.cpp index 587e1e1867..475622021b 100644 --- a/src/gui/image/qtiffhandler.cpp +++ b/src/gui/image/qtiffhandler.cpp @@ -496,13 +496,13 @@ bool QTiffHandler::write(const QImage &image) } //// write the color table // allocate the color tables - uint16 *redTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); - uint16 *greenTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); - uint16 *blueTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); + uint16 *redTable = static_cast<uint16 *>(malloc(256 * sizeof(uint16))); + uint16 *greenTable = static_cast<uint16 *>(malloc(256 * sizeof(uint16))); + uint16 *blueTable = static_cast<uint16 *>(malloc(256 * sizeof(uint16))); if (!redTable || !greenTable || !blueTable) { - qFree(redTable); - qFree(greenTable); - qFree(blueTable); + free(redTable); + free(greenTable); + free(blueTable); TIFFClose(tiff); return false; } @@ -519,9 +519,9 @@ bool QTiffHandler::write(const QImage &image) const bool setColorTableSuccess = TIFFSetField(tiff, TIFFTAG_COLORMAP, redTable, greenTable, blueTable); - qFree(redTable); - qFree(greenTable); - qFree(blueTable); + free(redTable); + free(greenTable); + free(blueTable); if (!setColorTableSuccess) { TIFFClose(tiff); diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index 441b3fa5be..834beda977 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -673,8 +673,8 @@ void QOpenGL2PaintEngineExPrivate::cleanupVectorPath(QPaintEngineEx *engine, voi d->unusedIBOSToClean << c->ibo; #else Q_UNUSED(engine); - qFree(c->vertices); - qFree(c->indices); + free(c->vertices); + free(c->indices); #endif delete c; } @@ -719,7 +719,7 @@ void QOpenGL2PaintEngineExPrivate::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; @@ -747,7 +747,7 @@ void QOpenGL2PaintEngineExPrivate::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 @@ -799,8 +799,8 @@ void QOpenGL2PaintEngineExPrivate::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; } @@ -835,12 +835,12 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path) vertices[i] = float(inverseScale * polys.vertices.at(i)); funcs.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) |