Esempio n. 1
0
 inline QDBusDefaultConnection(BusType type, const char *name)
     : QDBusConnection(connectToBus(type, QString::fromLatin1(name))), ownName(name)
 {
     // make sure this connection is running on the main thread
     QCoreApplication *instance = QCoreApplication::instance();
     if (!instance) {
         qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
                  type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
     } else if (QDBusConnectionPrivate::d(*this)) {
         QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
     }
 }
 inline QDBusDefaultConnection(BusType type, const char *name)
     : QDBusConnection(connectToBus(type, QString::fromLatin1(name))), ownName(name)
 { }