summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2020-05-26 09:14:15 -0700
committerThiago Macieira <thiago.macieira@intel.com>2020-06-23 00:29:31 +0000
commitcdcb75c46b968dbfeb1992c6bee19aceda27da38 (patch)
tree03f3e50d450e3b84a4dd4a39b041585faaa47d5d /src
parent04b120bc3c6fd20ff47582fd4e0ba30e1f3677ae (diff)
QMimeDatabase/zlib: fix build with z_const macro empty
The next_in pointer in z_stream is defined as "z_const Bytef *" but z_const is actually an empty macro in most builds. Since our data is read-only constexpr, we need this const_cast to compile. Fixes: QTBUG-84457 Pick-to: 5.15 Change-Id: Ied637aece2a7427b8a2dfffd1612a01ae46f7c1a Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/mimetypes/qmimeprovider.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp
index cbf2562581..47b5e42167 100644
--- a/src/corelib/mimetypes/qmimeprovider.cpp
+++ b/src/corelib/mimetypes/qmimeprovider.cpp
@@ -647,7 +647,7 @@ QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnu
#elif defined(MIME_DATABASE_IS_GZIP)
std::unique_ptr<char []> uncompressed(new char[size]);
z_stream zs = {};
- zs.next_in = mimetype_database;
+ zs.next_in = const_cast<Bytef *>(mimetype_database);
zs.avail_in = sizeof(mimetype_database);
zs.next_out = reinterpret_cast<Bytef *>(uncompressed.get());
zs.avail_out = size;