From 8be5e49379fa8c0f1e1e41ff4bce91e30699b352 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 20 Jun 2019 09:30:02 -0700 Subject: qscxmlc: Don't compress the templates Those files are small, so we may as well not bother. Fixes: QTBUG-76521 Change-Id: Ief874765cd7b43798de3fffd15a9f511bc9c723a Reviewed-by: Simon Hausmann Reviewed-by: Ulf Hermann --- tools/qscxmlc/scxmlcppdumper.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tools/qscxmlc/scxmlcppdumper.cpp') diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp index 40ae1dd..89a403b 100644 --- a/tools/qscxmlc/scxmlcppdumper.cpp +++ b/tools/qscxmlc/scxmlcppdumper.cpp @@ -108,13 +108,10 @@ static void genTemplate(QTextStream &out, const QString &filename, const Replace if (!file.isValid()) { qFatal("Unable to open template '%s'", qPrintable(filename)); } + Q_ASSERT(file.compressionAlgorithm() == QResource::NoCompression); QByteArray data; - if (file.isCompressed() && file.size()) { - data = qUncompress(file.data(), int(file.size())); - } else { - data = QByteArray::fromRawData(reinterpret_cast(file.data()), - int(file.size())); - } + data = QByteArray::fromRawData(reinterpret_cast(file.data()), + int(file.size())); const QString t = QString::fromLatin1(data); data.clear(); -- cgit v1.2.3