Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt Creator 15.0.1
Description
When there is a component and an instance which both have the same id, the "built-in" QML Code model incorrectly classifies both of these ids as instance ids and displays a "Duplicate Id. (M15)" error in the editor.
The error does not occur when qmllint is run nor when the QML Language Server is turned on, since it correctly identifies that the component id is not an instance id.
import QtQuick Window { width: 640 height: 480 visible: true title: qsTr("Hello World") component MyComponent : Item { id: myComponent Item { anchors.fill: myComponent } } MyComponent { id: myComponent }