summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tools/rcc/rcc.cpp37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 924f2904f0..4c463cf2a0 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -641,26 +641,31 @@ bool RCCResourceLibrary::interpretResourceFile(QIODevice *inputDevice,
QDir dir(file.filePath());
if (!alias.endsWith(slash))
alias += slash;
+
+ QStringList filePaths;
QDirIterator it(dir, QDirIterator::FollowSymlinks|QDirIterator::Subdirectories);
while (it.hasNext()) {
it.next();
- QFileInfo child(it.fileInfo());
- if (child.fileName() != QLatin1String(".") && child.fileName() != QLatin1String("..")) {
- const bool arc =
+ if (it.fileName() == QLatin1String(".")
+ || it.fileName() == QLatin1String(".."))
+ continue;
+ filePaths.append(it.filePath());
+ }
+
+ // make rcc output deterministic
+ std::sort(filePaths.begin(), filePaths.end());
+
+ for (const QString &filePath : filePaths) {
+ QFileInfo child(filePath);
+ const bool arc =
addFile(alias + child.fileName(),
- RCCFileInfo(child.fileName(),
- child,
- language,
- country,
- child.isDir() ? RCCFileInfo::Directory : RCCFileInfo::NoFlags,
- compressAlgo,
- compressLevel,
- compressThreshold,
- m_noZstd)
- );
- if (!arc)
- m_failedResources.push_back(child.fileName());
- }
+ RCCFileInfo(child.fileName(), child, language, country,
+ child.isDir() ? RCCFileInfo::Directory
+ : RCCFileInfo::NoFlags,
+ compressAlgo, compressLevel, compressThreshold,
+ m_noZstd));
+ if (!arc)
+ m_failedResources.push_back(child.fileName());
}
} else if (listMode || file.isFile()) {
const bool arc =