Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
3.3.1.1
Description
In case there are QMLs that assigned IDs starting with a word "import", VS Tools adds the code lines related to the IDs to import.qml file (as module names?). That causes Syntax errors in some environments, as follows :
main.qml
import QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls import QtQuick.Dialogs Window { visible: true width: 640 height: 480 Component.onCompleted: { importDialog.open() //★ } FileDialog { id: importDialog } } example: main.qml
import.qml
import QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls import QtQuick.Dialogs importDialog.open() //★ QmlObject { }
error message
D:/solution/Project/Release/qt/qmake/import.qml(52,36): error GA404624D: Syntax error
importDialog.open()
This issue was reported by a commercial user using VS2022 version 17.6.21 + Qt 6.8.1 + Qt VS Tools 3.3.1.1. This issue is affecting their project because they had to put a lot of time and effort in checking/analysing the issue.
The reproducer and its MSBuild binary log are attached.
Please note, the syntax error message will not be observed in this VS solution, while the unwanted code lines in import.qml are observed there.
The solution where the syntax error was observed cannot be shared since it is including confidential information.