Details
-
Suggestion
-
Resolution: Fixed
-
Not Evaluated
-
None
-
d808d8501 (dev)
Description
Currently, tools like the Qt Creator code model, qmllint, and qmlsc cannot correctly analyze ApplicationInterface and StartupTimer because they are injected using QQmlContext::setContextProperty().
Suggestions
- (Short-term) Converting this to qmlRegisterSingletonType() or qmlRegisterSingletonInstance() will make these singletons visible to Qt Creator's current code model (but not to other QML tooling)
- (Long-term) Converting this to QML_SINGLETON will make these singletons visible to all current QML tooling
Notes
Context properties are injected in the following files:
- src/common-lib/qml-utilities.cpp (dummy data)
- src/main-lib/main.cpp (StartupTimer)
- src/manager-lib/qmlinprocessruntime.cpp (ApplicationInterface)
- src/tools/appman/appman.cpp (build config)
- src/tools/launcher-qml/launcher-qml.cpp (StartupTimer + ApplicationInterface)
Attachments
Issue Links
- is covered by
-
QTBUG-103266 QtApplicationManager: Use declarative registration
- Closed
For Gerrit Dashboard: QTBUG-118426 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
557901,4 | Refactor the ApplicationInterface root context property | dev | qt/qtapplicationmanager | Status: MERGED | +2 | +1 |