QmlJS: Add check for duplicated import

Add a soft check for duplicated Qml/JS imports which
adds a warning when a file contains imports that
duplicate the same URI / version or file path.

Change-Id: Ib9a1f8a90dd3cf469d90e83abc1d748901b1e353
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Christian Stenger
2019-12-09 13:13:58 +01:00
parent a57bfda5d8
commit 6b492866af
5 changed files with 34 additions and 2 deletions

View File

@@ -240,6 +240,8 @@ StaticAnalysisMessages::StaticAnalysisMessages()
tr("Referencing the parent of the root item is not supported in a Qt Quick UI form."));
newMsg(StateCannotHaveChildItem, Error,
tr("A State cannot have a child item (%1)."), 1);
newMsg(WarnDuplicateImport, Warning,
tr("Duplicate import (%1)."), 1);
}
} // anonymous namespace