Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QDbusConnection failsafe approach
Qt 6.11 is out! See what's new in the release blog

QDbusConnection failsafe approach

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 671 Views 2 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.
  • sagaS Offline
    sagaS Offline
    saga
    wrote on last edited by
    #1

    hi, i'm working on an applicaiton which use QtDbus,for some reason my application might start before DBus service,i use QtDbusConnection::systemBus() to get instance of system bus.
    here is the pseudo code
    dbusstarted = false;
    while (!dbusstarted) {
    conn = QtDbusConnection::systemBus();
    dbusstarted = conn.isConntected();
    sleep(n);
    }
    ...
    but i find that if dbus service is started after my app, conn.isConntected() will always return not connected result , this seems caused by systemBus() return a global static variable , my question is how to release the old conn and get a new one?
    thanks in advance

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      That's something you should bring to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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