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

crash on QML property bindings

XMLWordPrintable

    • All
    • 87d27d065 (dev), d8555a970 (6.6), 08e62e3eb (tqtc/lts-6.5)

      I have a binding to an array reduce function, looking like that:

       

      Item {
          property int preferredHeight: mainItem.children.reduce(maximumImplicitHeightReducer, 0) + topPadding + bottomPadding
          function maximumImplicitHeightReducer(accumulator: real, item: Item): real {
              return Math.max(accumulator, item.implicitHeight);
          } 

      This generates the attached crash log on startup.

       

       

      If i replace the call to the function maximumImplicitHeightReducer to an inline arrow function like that:

      property int preferredHeight: mainItem.children.reduce((accumulator, item) => {
              return Math.max(accumulator, item.implicitHeight);
          }, 0) + topPadding + bottomPadding 

      then the crash goes away

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

            ulherman Ulf Hermann
            notmart Marco Martin
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes