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

Check of connection to dbus-daemon process does not work reliably

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.6.3
    • D-Bus
    • None
    • Visual Studio 2013
    • Windows

    Description

      I want to check the connection to dbus-daemon process.
      My solution is working fine, in case of dbus-daemon is already started, and after that the connection is checked. In case of dbus-daemon process is started during the connection is checked in a force connect loop, there is no OK response (isConnected).
      Here is my easy test example:

      int Dbushandler::InitializeDBus()
      {
      
        int counter = 1;
      
        while (counter <= 10)
        {
          QDBusConnection connection_to_dbus = QDBusConnection::sessionBus();
      
          if (!connection_to_dbus.isConnected())
          {
            printf("Could not connect to DBUS\n");
          }
          else
          {
            printf(Connected to DBUS\n");
          }
      
          counter++;
      
          Sleep(500);
        }
      }
      

      QT5.6.3 - Windows10/7/XP
      Thanks for any kind of feedback.

      Attachments

        Activity

          People

            thiago Thiago Macieira
            joschn Jochen Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: