Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Qt DBus signal not arriving
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Qt DBus signal not arriving

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 946 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chrisco
    wrote on last edited by
    #1

    We are using a DBus interface (QDBusAbstractInterface) with this signal:
    @ <signal name="ContentUpdated">
    <doc>
    <line>ContentUpdated = This signal updates the input content data for the specified session</line>
    </doc>
    <arg name="locationInputHandle" type="y" direction="out" />
    <arg name="guidable" type="b" direction="out" />
    <arg name="availableSelectionCriteria" type="aq" direction="out" />
    <arg name="address" type="a{qv}" direction="out" />
    </signal>
    @

    Using qdbusxml2cpp it is translated to this interface:
    @Q_SIGNALS:
    void sgnContentUpdated(quint8 locationInputHandle, bool guidable, TUshortList availableSelectionCriteria, TUshortVariantMap address);
    @

    For some reason, when i use the TUShortVariantMap in a QVariant::setValue() call the signal does not arrive anymore.
    Below is the code where i do this. So without this code, and in particular the call to QVariant::setValue(), the ContentUpdates signal arrives without problems.

    @
    void CGuidanceHandler::updateAdr(const quint32 aCurrentRouteOffset, const CRoadBookItem& aCurrentInstruction)
    {
    TUshortVariantMap valueOnRoute;
    QDBusVariant offsetValue;
    offsetValue.setVariant(QVariant(aCurrentRouteOffset));
    valueOnRoute.insert(GENIVI_MAPDATAACCESS_OFFSET, offsetValue);

    QDBusVariant value;
    QVariant innerValue;
    innerValue.setValue(valueOnRoute); // This call results in the signal not arriving anymore
    value.setVariant(innerValue);

    // etc..
    }
    @

    Any ideas why this can cause the signal not arriving anymore?
    Or any other pointers why signals could not be arriving?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      chrisco
      wrote on last edited by
      #2

      I found the problem. I noticed that there was no Q_DECLARE_METATYPE call on the type in the main library, only in the QServicePlugin which is a different library.

      This was fixed after i added the Q_DECLARE_METATYPE call in the main library.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved