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

QDBusPendingReply::value() crash if call fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.1.0
    • 4.8.4, 5.0.0
    • D-Bus
    • None
    • dc131e3a5378d84026941e6626db524688b988f4

    Description

      I had a function like this:

      QDBusObjectPath Daemon::getTid()
      {
          // Where CreateTransaction
          // returns a QDBusPendingReply<QDBusObjectPath>
          return d->daemon->CreateTransaction();;
      }
      

      This code crashes if the called interface is not available
      because value() doesn't return a default constructed value
      as it doesn't check if is valid, doing a argumentAt<0> and
      there isn't such argument.

      It should behave like QDBusReply::value()

      Thanks.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            dantti Daniel Nicoletti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes