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

QtRO return values from .rep SLOT not marshalled for some types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.0
    • Remote Objects
    • None
    • All

    Description

      In Qt Remote Objects, some types are not marshalled correctly when used as return values from a SLOT, even though those types are correctly marshalled when used as parameters.

      Specifically, my problem is with standard C++ integral types (int32_t, size_t, etc) but I suspect the issue is larger.

      Minimal example:

      In .rep

      class Foo {

          SLOT(uint32_t foo(uint32_t value))

      }

      Source implementation

      uint32_t FooImpl::foo(uint32_t value) {

          qDebug() << value; // OK, prints 44

          return 42;

      }

      Replica usage

      auto reply = replica->foo(44);

      reply.waitForFinished();

      qDebug() << reply.returnValue(); // NOT OK: prints 0, should be 42

       

      After examination, the QVariant in QRemoteObjectPendingCall is invalid.

      If I change the .rep to read:

          SLOT(unsigned int foo(uint32_t value))

      and without changing anything else (which compiles fine because unsigned int and uint32_t are the same on my platform), the return value is now correctly marshalled.

      Attachments

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

        Activity

          People

            bstottle Brett Stottlemyer
            iruau iruau logic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes