QDbusConnection failsafe approach



  • 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


  • Lifetime Qt Champion

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.