diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-19 14:34:44 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-30 09:18:41 +0000 |
commit | cffe2129465d7fa5dd86c7a7beabeb9cbbf0389c (patch) | |
tree | 350b181f8e421dbbb588c6138b5681a2da2f896c /src/lib/corelib/buildgraph/transformer.cpp | |
parent | 77d3edc936af2f40fb16a3bf8c752967b6a93861 (diff) |
Make sure product type and artifact file tags are sorted
... when accessed from JavaScript. Due to the FileTag class being based
on Id, we sometimes get a different order of elements, leading to false
positives in change tracking.
Change-Id: Ie2f1a2e9a229fddcd479175323dded3a80bb02e5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/transformer.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/transformer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/transformer.cpp b/src/lib/corelib/buildgraph/transformer.cpp index fab7431ab..009e8cde4 100644 --- a/src/lib/corelib/buildgraph/transformer.cpp +++ b/src/lib/corelib/buildgraph/transformer.cpp @@ -48,6 +48,7 @@ #include <tools/scripttools.h> #include <tools/qbsassert.h> #include <tools/stringconstants.h> +#include <tools/stlutils.h> #include <QtCore/qdir.h> @@ -116,7 +117,7 @@ QScriptValue Transformer::translateFileConfig(ScriptEngine *scriptEngine, const setArtifactProperty(obj, StringConstants::completeBaseNameProperty(), js_completeBaseName, artifact); setArtifactProperty(obj, QStringLiteral("baseDir"), js_baseDir, artifact); - const QStringList fileTags = artifact->fileTags().toStringList(); + const QStringList fileTags = sorted(artifact->fileTags().toStringList()); obj.setProperty(StringConstants::fileTagsProperty(), scriptEngine->toScriptValue(fileTags)); if (!defaultModuleName.isEmpty()) obj.setProperty(StringConstants::moduleNameProperty(), defaultModuleName); |