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

Crash when overwriting qsTr bindindig with qt.qml.binding.removal.info=true

    XMLWordPrintable

Details

    • cfdb483613494d982a574c9334f2b21621024b1b (qt/qtdeclarative/5.12)

    Description

      Reproducible with qt.qml.binding.removal.info=true.

      The following example crashes on clicking when the t.text binding is overwritten.

      This is due to "f" being a null pointer in QQmlBinding::expressionIdentifier() which is used for the debug output when the logging category is active.

      Looks like qsTr is something special.

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
      
        Text {
          id: t
          anchors.centerIn: parent
          text: qsTr("Hello")
        }
      
        TapHandler {
          onTapped: t.text = "World"
        }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            njeisecke Nils Jeisecke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes