summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qzip.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-05 22:25:45 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-03-12 04:23:50 +0000
commitce30394686a4ac2cfbda560c5d7113432d84314e (patch)
treecb9a52e376f3233e4c78d7e657f9243e454d955c /src/gui/text/qzip.cpp
parent6025c36d014d77091d09271d68154261d1977761 (diff)
QtGui: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946844bc31eb8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/gui/text/qzip.cpp')
-rw-r--r--src/gui/text/qzip.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp
index 321c7937f7..9f561dcb02 100644
--- a/src/gui/text/qzip.cpp
+++ b/src/gui/text/qzip.cpp
@@ -194,7 +194,7 @@ static int inflate(Bytef *dest, ulong *destLen, const Bytef *source, ulong sourc
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = const_cast<Bytef*>(source);
stream.avail_in = (uInt)sourceLen;
if ((uLong)stream.avail_in != sourceLen)
return Z_BUF_ERROR;
@@ -229,7 +229,7 @@ static int deflate (Bytef *dest, ulong *destLen, const Bytef *source, ulong sour
z_stream stream;
int err;
- stream.next_in = (Bytef*)source;
+ stream.next_in = const_cast<Bytef*>(source);
stream.avail_in = (uInt)sourceLen;
stream.next_out = dest;
stream.avail_out = (uInt)*destLen;
@@ -1008,7 +1008,7 @@ QByteArray QZipReader::fileData(const QString &fileName) const
do {
baunzip.resize(len);
res = inflate((uchar*)baunzip.data(), &len,
- (uchar*)compressed.constData(), compressed_size);
+ (const uchar*)compressed.constData(), compressed_size);
switch (res) {
case Z_OK: