summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@collabora.com>2011-12-20 21:39:12 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-06 14:11:14 +0100
commitb08daaedd45457b775cb90d2c2650510daff1c8d (patch)
treed68ea8016a15ee851813133a51897a7a81aedc16 /src/gui/image
parent514ef34d1f838be119961003c0411a88352ba535 (diff)
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 <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qtiffhandler.cpp18
1 files changed, 9 insertions, 9 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);