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

ListModel.get() and a variable that was assigned ListModel.get() to are not equal

XMLWordPrintable

      The following test case explains the bug better than I can:

      import QtQuick 2.3
      import QtTest 1.1
      
      TestCase {
          ListModel {
              id: listModel
              ListElement { foo: "bar" }
          }
      
          function test_ListModel() {
              var element = listModel.get(0);
              compare(element, listModel.get(0)); // PASS with 5.5.0 and 5.6.0
              verify(element == listModel.get(0)); // PASS with 5.5.0 but FAIL with 5.6.0
              verify(element === listModel.get(0)); // PASS with 5.5.0 but FAIL with 5.6.0
          }
      }
      

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

            shausman Simon Hausmann
            ala ala
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes