Do not use zstd compression for Qt6 as there is no built-in decompression

This commit is contained in:
Matthias Koefferlein 2022-11-06 01:23:39 +01:00
parent 240281d9ff
commit cd3ca9e536
2 changed files with 7 additions and 2 deletions

View File

@ -130,6 +130,11 @@ equals(HAVE_CRONOLOGY, "1") {
INCLUDEPATH += $$CRONOLOGY_INCLUDE
}
!lessThan(QT_MAJOR_VERSION, 6) {
# internal resource readers to not support zstd so far
QMAKE_RESOURCE_FLAGS += --compress-algo zlib
}
msvc {
QMAKE_CXXFLAGS += \

View File

@ -212,9 +212,9 @@ InputStream::InputStream (const std::string &abstract_path)
QByteArray data;
#if QT_VERSION >= 0x60000
if (res.compressionAlgorithm () == QResource::ZlibCompression) {
if (res.compressionAlgorithm () == QResource::ZlibCompression) {
#else
if (res.isCompressed ()) {
if (res.isCompressed ()) {
#endif
data = qUncompress ((const unsigned char *)res.data (), (int)res.size ());
} else {