Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-118426

AppMan: Convert ApplicationInterface and StartupTimer from context properties to proper QML singletons

    XMLWordPrintable

Details

    • 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

          For Gerrit Dashboard: QTBUG-118426
          # Subject Branch Project Status CR V

          Activity

            People

              rgriebl Robert Griebl
              skoh-qt Sze Howe Koh
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes