aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljslinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljslinter.cpp')
-rw-r--r--src/qmlcompiler/qqmljslinter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljslinter.cpp b/src/qmlcompiler/qqmljslinter.cpp
index 002014e904..51a1489360 100644
--- a/src/qmlcompiler/qqmljslinter.cpp
+++ b/src/qmlcompiler/qqmljslinter.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "qqmljslinter_p.h"
@@ -834,6 +834,9 @@ QQmlJSLinter::FixResult QQmlJSLinter::applyFixes(QString *fixedCode, bool silent
return a.location().offset < b.location().offset;
});
+ const auto dupes = std::unique(fixesToApply.begin(), fixesToApply.end());
+ fixesToApply.erase(dupes, fixesToApply.end());
+
for (auto it = fixesToApply.begin(); it + 1 != fixesToApply.end(); it++) {
const QQmlJS::SourceLocation srcLocA = it->location();
const QQmlJS::SourceLocation srcLocB = (it + 1)->location();