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

QMetaObject::invokeMethod (DirectConnection) doesn't work with qint64/quint64 return types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.2.0
    • 5.1.0 , 5.1.1
    • None
    • Qt 5.1.1/5.1.0 Linux x86 and Win32
    • b49327145eb984c2051585d89f0826c58d35c116

    Description

      If Q_INVOKABLE method's return type is qint64 or quint64 its impossible to call it with QMetaObject::invokeMethod

      call fails with no error message on the console:

      // method signature
      Q_INVOKABLE qint64 invokable2(const qint64 a);
      // call
      bool result2 = QMetaObject::invokeMethod(t, "invokable2", Qt::DirectConnection, Q_RETURN_ARG(qint64, returnVal2), Q_ARG(qint64, 777));

      If return type is "long long int", or "int" all works fine.

      This problem persists only with Qt 5.1.1/5.1.0.
      Qt 4.8.4 has no such issue.

      Excample application attached

      Attachments

        1. InvokeTest.pro
          0.3 kB
        2. main.cpp
          0.7 kB
        3. testclass.cpp
          0.2 kB
        4. testclass.h
          0.3 kB
        For Gerrit Dashboard: QTBUG-33222
        # Subject Branch Project Status CR V

        Activity

          People

            ogoffart Olivier Goffart (Woboq GmbH)
            eugene.seppel Eugene Seppel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes