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

Item's member function names sometimes are not found and get "Uncaught exception: foobar is not defined" error

    XMLWordPrintable

Details

    Description

      save the follow code to tst_foobar.qml, and run it with "qmltestrunner -input tst_foobar.qml" several times, you will see the error.

      tst_foobar.qml
      import QtQuick 2.0
      import QtTest 1.0
         TestCase {
             id:testCase
             function test_stack() {
                 var limit = 125;
                 for (var i = limit-1; i > 0; --i)
                 {
                     console.log("i=" + i);
                     compare(1, 1);
                     //testCase.compare(1, 1); //this always works
                 }
             }
       }
      

      Attachments

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

        Activity

          People

            charles Charles Yin (closed Nokia identity) (Inactive)
            charles Charles Yin (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes