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

"Passing incompatible arguments to C++ functions from JavaScript is not allowed" message gives no indication of why the types are incompatible

    XMLWordPrintable

Details

    Description

      1. Cherry-pick https://codereview.qt-project.org/c/qt/qtdeclarative/+/479798/7
      2. Build qtdeclarative and run tst_basic -input <path-to-qtdeclarative>/tests/auto/quickcontrols/controls/data/tst_stackview.qml StackView::test_push:new; it will produce an error about incompatible types but doesn't say what the actual vs expected types are
      11:25:05: Starting /home/mitch/dev/qt-dev-debug/qtdeclarative/tests/auto/quickcontrols/controls/basic/tst_basic -input /home/mitch/dev/qt-dev/qtdeclarative/tests/auto/quickcontrols/controls/data/tst_stackview.qml StackView::test_push:new...
      qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
      ********* Start testing of tst_controls::Basic *********
      Config: Using QtTest library 6.6.0, Qt 6.6.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 11.3.0), ubuntu 22.04
      PASS   : tst_controls::Basic::StackView::initTestCase()
      QWARN  : tst_controls::Basic::StackView::test_push(new) "Could not convert argument 0 at"
      QWARN  : tst_controls::Basic::StackView::test_push(new) 	 "test_push@file:///home/mitch/dev/qt-dev/qtdeclarative/tests/auto/quickcontrols/controls/data/tst_stackview.qml:402"
      QWARN  : tst_controls::Basic::StackView::test_push(new) 	 "qtest_runInternal@qrc:/qt-project.org/imports/QtTest/TestCase.qml:1803"
      QWARN  : tst_controls::Basic::StackView::test_push(new) 	 "qtest_runFunction@qrc:/qt-project.org/imports/QtTest/TestCase.qml:1819"
      QWARN  : tst_controls::Basic::StackView::test_push(new) 	 "qtest_run@qrc:/qt-project.org/imports/QtTest/TestCase.qml:1977"
      QWARN  : tst_controls::Basic::StackView::test_push(new) 	 "expression for onTriggered@qrc:/qt-project.org/imports/QtTest/TestSchedule.qml:23"
      FAIL!  : tst_controls::Basic::StackView::test_push(new) Uncaught exception: Passing incompatible arguments to C++ functions from JavaScript is not allowed.
         Loc: [/home/mitch/dev/qt-dev/qtdeclarative/tests/auto/quickcontrols/controls/data/tst_stackview.qml(402)]
      PASS   : tst_controls::Basic::StackView::cleanupTestCase()
      Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 48ms
      ********* Finished testing of tst_controls::Basic *********
      11:25:05: /home/mitch/dev/qt-dev-debug/qtdeclarative/tests/auto/quickcontrols/controls/basic/tst_basic exited with code 1
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes