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

Calling push() on a readonly QML property array-like property yields no error

    XMLWordPrintable

Details

    Description

      Trying to modify a read-only array-like property does not yield an error.

      import QtQuick 2.0
      Item {
          Component.onCompleted: {
              var args = Qt.application.arguments
              console.log("Before:", args);
              console.log(args.push("should emit an error?"));
              console.log("After:", args);
          }
      }
      

      Resulting log:

      qml: Before: qmlscene,pushtest.qml
      qml: 3
      qml: After: qmlscene,pushtest.qml
      

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            kossebau Friedrich W. H. Kossebau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes