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

QtScript fail to select the right overloaded C++ slot.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.9.4
    • Qt Script
    • None
    • All

    Description

      If an exported QObject slot is overloaded with :

      • The same number of parameter.
      • The parameters that differs are pointer to classes that have conversion function declared with qScriptRegisterMetaType

      The conversion function is called with a data pointer that may not match the expecteed object and QtScript select the last slot that matches the method name and argument count.

       

      I got the issue with Qt 5.9.4, but I looked into QtScript code in 5.12and it seems to be still buggy.

      I attached a rough patch that fix the issue at least for parameters that inehrits QObject.

       

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            xjkdfhsdlvhn Cédric Borgese
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes