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

Reg[6.5.8-6.8.2] QMetaObject::invokeMethod() with Generic argument

    XMLWordPrintable

Details

    • Windows

    Description

      With QMetaObject::invokeMethod call with QGenericArgument. following error is displayeed. 
      QMetaObject::invokeMethod: No such method TestClass::testMethod(QVariantMap)
      Candidates are: .....

      Same code when build with Qt6.5.8 works without issue.

      Attached tiny example which gives following output with Qt6.8.2

      QMetaObject::invokeMethod: No such method TestClass::testMethod(QVariantMap)
      Candidates are:
          testMethod(QMap<QString,QVariant>)
      Invoke with QVariantMap successful? false
      testMethod called with map: QMap(("key1", QVariant(int, 123))("key2", QVariant(QString, "hello")))
      Invoke with QMap<QString,QVariant> successful? true

       

      With Qt6.5.8 it gives following

      testMethod called with map: QMap(("key1", QVariant(int, 123))("key2", QVariant(QString, "hello")))
      Invoke with QVariantMap successful? true
      testMethod called with map: QMap(("key1", QVariant(int, 123))("key2", QVariant(QString, "hello")))
      Invoke with QMap<QString,QVariant> successful? true

       

       

      Attachments

        1. qtbug135657.zip
          17 kB
          Irfan Omair
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            irfan.omair@digia.com Irfan Omair
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes