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

qmltc: inline components

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.0 Beta1
    • None
    • QML: Compiler

    Description

      From andrei's notes:

      • \terra incognita
      • they define a new type (as if having a separate QML file), so must be handled similarly (extra care should be given to how context hierarchy is handled for them: as for document roots?)
      • they use the compilation unit of the QML file (no separate CU)
      • they support cyclic references but not cyclic instantiations (would it actually work for qmltc? might have to use QQmlComponent wrapping just because of this)
        import QtQuick 2.15
        Item {
          component A : Item {
            property B b // NB: if "b: B {}", it should be a recursion error
          }
          component B : Item {
            property A a
          }
          A {
            b: B { Component.onCompleted: console.log(a) }
          }
        }
        
      • could be troublesome in the code resolving names to types (e.g. is Foo.Bar an enum.enumerator or an inline component?)

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              sami.shalayel Sami Shalayel
              sami.shalayel Sami Shalayel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes