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

Change signal emitted for undefined value

    XMLWordPrintable

Details

    Description

      This code triggers the onSomethingChanged signal handler each time something is set with undefined, which it already is - this is not a change.

      import QtQuick 2.3
      
      Item {
          id: root
      
          property var something
      
          onSomethingChanged: {
              console.log("Something changed!")
          }
      
          Timer {
              running: true
              interval: 200
              repeat: true
              onTriggered: {
                  // if (root.something !== undefined)
                  root.something = undefined;
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              ske Steve
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes