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

Regression, can't assign "undefined" to a QML property

    XMLWordPrintable

Details

    Description

      This was seen with QML compiled from qt/qt-qml with HEAD at
      5eb8e749bdd60ce93737b96f8f736796dfa77281

      This code

      [...]
          property var returnMessage;
          property var rejectDrop: false;
      
          function _reset() {
              returnMessage = undefined;    // reset it
              rejectDrop = false;
          }
      

      now result in this error
      tesla/common/dragndrop/DragAndDropArea.qml:13: Error: Cannot assign [undefined] to QVariant
      this used to work just the other day. Changing the line to

      returnMessage = null;    // reset it
      

      fix the problem, but I think the former should still work and that this is a regression.

      Attachments

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

        Activity

          People

            aakenned Aaron Kennedy
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes