summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2019-06-20 09:30:02 -0700
committerThiago Macieira <thiago.macieira@intel.com>2019-06-20 16:24:39 -0700
commit8be5e49379fa8c0f1e1e41ff4bce91e30699b352 (patch)
tree496878046bda02905f63431a4b80c95357835e34
parentbf4be2d9fb957298a8395afb368b690948a0c7a9 (diff)
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 <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--tools/qscxmlc/scxmlcppdumper.cpp9
-rw-r--r--tools/qscxmlc/templates.qrc6
2 files changed, 6 insertions, 9 deletions
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<const char *>(file.data()),
- int(file.size()));
- }
+ data = QByteArray::fromRawData(reinterpret_cast<const char *>(file.data()),
+ int(file.size()));
const QString t = QString::fromLatin1(data);
data.clear();
diff --git a/tools/qscxmlc/templates.qrc b/tools/qscxmlc/templates.qrc
index 6f2ccf6..a00f24e 100644
--- a/tools/qscxmlc/templates.qrc
+++ b/tools/qscxmlc/templates.qrc
@@ -1,7 +1,7 @@
<RCC>
<qresource prefix="/">
- <file>data.t</file>
- <file>decl.t</file>
- <file>cppdatamodel.t</file>
+ <file compression-algorithm="none">data.t</file>
+ <file compression-algorithm="none">decl.t</file>
+ <file compression-algorithm="none">cppdatamodel.t</file>
</qresource>
</RCC>