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>
This commit is contained in:
Leander Beernaert 2019-11-26 15:50:11 +01:00
parent d3814e51bb
commit 43f341a137
2 changed files with 1160 additions and 1158 deletions

View File

@ -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));

File diff suppressed because it is too large Load Diff