Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 13.0.2, Qt Creator 14.0.1, Qt Creator 15.0.0
Description
"Follow Symbol Under Cursor" (Tools -> QML/JS -> Follow Symbol Under Cursor, or pressing F2) does not make a jump, if you run it on QML file to jumpt to a singleton defined in C++.
This issue was reproduced with Qt Creator 15.0.0 / 14.0.1 / 13.0.2 + Qt 6.8.1 / Qt 6.6.3.
Reproducer 1:
File System Explorer example application provided with Qt
"Follow Symbol Under Cursor" does not work for FileSystemModel class, which uses QML_ELEMENT and QML_SINGLETON macro.
If you press "F2" on "FileSystemModel" in FileSystemView.qml, it raises an error with the message below :
'Could not open "filesystemmodel.h" for reading. Either the file does not exist or you do not have the permissions to open it'
This is not reproduced with LineNumberModel class, which only uses QML_ELEMENT macro.
You can jump from "LineNumberModel" in Editor.qml to the class definition in linenumbermodel.h, if the project once built.
Reproducer 2:
Attached reproducer (singleton_logger)
You cannot jump from "Logger" in Main.qml to logger.h by pressing F2, with the error below :
'Could not open "logger.h" for reading. Either the file does not exist or you do not have the permissions to open it'