From 40b40e6274e4db14531461c455c88378d12d85f2 Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 6 Dec 2012 15:47:26 +0100 Subject: Finally IFW compiles with Qt5 (use private headers) Change-Id: I2604c77418e4a930bd0f76092db581fef1e45817 Reviewed-by: Tim Jenssen --- tools/binarycreator/binarycreator.cpp | 2 ++ tools/binarycreator/rcc/rcc.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'tools/binarycreator') diff --git a/tools/binarycreator/binarycreator.cpp b/tools/binarycreator/binarycreator.cpp index 8002f16be..bd8ba3af7 100644 --- a/tools/binarycreator/binarycreator.cpp +++ b/tools/binarycreator/binarycreator.cpp @@ -343,6 +343,8 @@ static int runRcc(const QStringList &args) for (int i = 0; i < argc; ++i) argv[i] = qstrdup(qPrintable(args[i])); + // Note: this does not run the rcc provided by Qt, this one is using the compiled in binarycreator + // version. If it happens that resource mapping fails, we might need to adapt the code here... const int result = runRcc(argc, argv.data()); foreach (char *arg, argv) diff --git a/tools/binarycreator/rcc/rcc.cpp b/tools/binarycreator/rcc/rcc.cpp index de1cfc566..2311fb66c 100644 --- a/tools/binarycreator/rcc/rcc.cpp +++ b/tools/binarycreator/rcc/rcc.cpp @@ -288,7 +288,11 @@ qint64 RCCFileInfo::writeDataName(RCCResourceLibrary &lib, qint64 offset) offset += 2; // write the hash +#if QT_VERSION < 0x050000 lib.writeNumber4(qHash(m_name)); +#else + lib.writeNumber4(qt_hash(m_name)); +#endif if (text) lib.writeString("\n "); offset += 4; @@ -791,7 +795,11 @@ bool RCCResourceLibrary::writeDataNames() static bool qt_rcc_compare_hash(const RCCFileInfo *left, const RCCFileInfo *right) { +#if QT_VERSION < 0x050000 return qHash(left->m_name) < qHash(right->m_name); +#else + return qt_hash(left->m_name) < qt_hash(right->m_name); +#endif } bool RCCResourceLibrary::writeDataStructure() -- cgit v1.2.3