summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-11-26 15:50:11 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2019-11-27 10:59:58 +0100
commit43f341a13745473cf181cfe6a6ef4725aa2f88eb (patch)
treec9b78e60cb5ec82cd8be60c393d9f0c5b96c56ab /src/tools
parentd3814e51bb1c19aa868566aea5d4edd19d2e3944 (diff)
Moc Sort json file list in collectjson
This patch ensures that the list of input files are sorted before being collected. This provides consistency when comparing results generated from the CMake port which do not have the same order as qmake. Change-Id: I46e3acf7c26dfd21fd0c1196bdeddf22acbf6ba5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/moc/collectjson.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/moc/collectjson.cpp b/src/tools/moc/collectjson.cpp
index 4029bca5e9..fe499151cb 100644
--- a/src/tools/moc/collectjson.cpp
+++ b/src/tools/moc/collectjson.cpp
@@ -83,7 +83,9 @@ int collectJson(const QStringList &jsonFiles, const QString &outputFile)
}
}
- for (const QString &jsonFile: jsonFiles) {
+ QStringList jsonFilesSorted = jsonFiles;
+ jsonFilesSorted.sort();
+ for (const QString &jsonFile : qAsConst(jsonFilesSorted)) {
QFile f(jsonFile);
if (!f.open(QIODevice::ReadOnly)) {
fprintf(stderr, "Error opening %s for reading\n", qPrintable(jsonFile));