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

QML optimizes out model assignment if no js is called

    XMLWordPrintable

Details

    • Windows
    • 6ea2a1cdb7 (qt/qtdeclarative/dev) 6ea2a1cdb7 (qt/tqtc-qtdeclarative/dev) 981cb8a3e9 (qt/tqtc-qtdeclarative/6.2) cfb3438ecc (qt/qtdeclarative/6.4) cfb3438ecc (qt/tqtc-qtdeclarative/6.4) 40f82b9b88 (qt/qtdeclarative/6.3) 40f82b9b88 (qt/qtdeclarative/6.3.2)

    Description

      This works only if any js is invoked.

      See the bug in action: IyqhZotKL8.mp4

      Repo: https://gitlab.com/kelteseth/ScreenPlay

      Internally it uses LIST_PROPERTY macro that is defined herem that is a wrapper around QQmlListProperty  https://gitlab.com/kelteseth/ScreenPlay/-/blob/master/ScreenPlayUtil/inc/public/ScreenPlayUtil/ListPropertyHelper.h#L58

      If it helps, I could recreate this issue in a test project.

      Attachments

        1. image-2022-07-22-12-22-09-956.png
          71 kB
          Elias Steurer
        2. image-2022-07-22-12-24-34-980.png
          29 kB
          Elias Steurer
        3. IyqhZotKL8.mp4
          11.49 MB
          Elias Steurer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            kelteseth Elias Steurer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes