diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-11-08 14:16:33 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-12-12 16:36:09 +0000 |
commit | d20c9805763ab3dc504ebf2cefd33499d89ef22c (patch) | |
tree | d6c9b9f2694461ff0cfe41ce4801ad34cdc05a37 /src/tools/rcc/rcc.h | |
parent | c820e0b11745750a18460f85b697230881438006 (diff) |
Resources: reject compressed content we can't decompress
This solution is composed of two features:
1) C++ code generated by RCC uses two symbols exported from QtCore that
are only present if the feature was compiled in. If the feature was not
compiled in, this will cause a linker error either at build time or at
load time (if they were functions, the error could be at runtime).
2) Binary files generated by RCC have a new header field containing
flags. We're currently using two flags, one for Zlib and one for
Zstandard.
This means we now have binary RCC format version 3.
Change-Id: I42a48bd64ccc41aebf84fffd156545fb6a4f72d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/tools/rcc/rcc.h')
-rw-r--r-- | src/tools/rcc/rcc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/rcc/rcc.h b/src/tools/rcc/rcc.h index 7603a41cde..ad1c5cd166 100644 --- a/src/tools/rcc/rcc.h +++ b/src/tools/rcc/rcc.h @@ -134,6 +134,7 @@ private: bool writeInitializer(); void writeMangleNamespaceFunction(const QByteArray &name); void writeAddNamespaceFunction(const QByteArray &name); + void writeDecimal(int value); void writeHex(quint8 number); void writeNumber2(quint16 number); void writeNumber4(quint32 number); @@ -160,6 +161,7 @@ private: int m_treeOffset; int m_namesOffset; int m_dataOffset; + quint32 m_overallFlags; bool m_useNameSpace; QStringList m_failedResources; QIODevice *m_errorDevice; |