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

SignalSpy created with Qt.createQmlObject always remains invalid

    XMLWordPrintable

Details

    • 9dd496c069154ac655be9b85b72a6eb409bfa223

    Description

      SignalSpy {
              id: spy
              target: button
              signalName: "clicked"
          }
      
      var autoSpy = Qt.createQmlObject('import QtTest 1.1; SignalSpy {}', testCase, "SignalSpy");
      autoSpy.target = button
      autoSpy.signalName = "clicked"
      

      "autoSpy" does not work whereas "spy" works. This bug prevents integration of QtLocation for 5.6 or higher.

      Unit test has been provided. I would expect the test to succeed. The current output is:

      ********* Start testing of declarative_core *********
      Config: Using QtTest library 5.6.0, Qt 5.6.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 4.8.4)
      PASS   : declarative_core::ButtonClick::initTestCase()
      FAIL!  : declarative_core::ButtonClick::test_click() Compared values are not the same
         Actual   (): 0
         Expected (): 1
         Loc: [/home/bb/dev/qt/qt56/qtlocation/tests/auto/declarative_core/tst_aaa.qml(34)]
      PASS   : declarative_core::ButtonClick::cleanupTestCase()
      Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted
      ********* Finished testing of declarative_core *********
      

      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
              ablasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes