bool QNetworkManagerSettingsConnection::setConnections() { if(!isValid() ) return false; bool allOk = false; if(!nmConnection.connect(d->service, d->path, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Updated"), this, SIGNAL(updated(QNmSettingsMap)))) { allOk = true; } else { QDBusError error = nmConnection.lastError(); } delete nmDBusHelper; nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForSettingsRemoved(QString)), this,SIGNAL(removed(QString))); if (!nmConnection.connect(d->service, d->path, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"), nmDBusHelper, SIGNAL(slotSettingsRemoved()))) { allOk = true; } return allOk; }
bool QNetworkManagerSettingsConnection::setConnections() { if (!isValid()) return false; QDBusConnection dbusConnection = QDBusConnection::systemBus(); bool allOk = true; if (!dbusConnection.connect(service(), interfacepath, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Updated"), this, SIGNAL(updated()))) { allOk = false; } if (!dbusConnection.connect(service(), interfacepath, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"), this, SIGNAL(slotSettingsRemoved()))) { allOk = false; } return allOk; }
bool QNetworkManagerSettingsConnection::setConnections() { if(!isValid() ) return false; bool allOk = false; if(!QDBusConnection::systemBus().connect(d->service, d->path, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("NewConnection"), this, SIGNAL(updated(QNmSettingsMap)))) { allOk = true; } nmDBusHelper = new QNmDBusHelper(this); connect(nmDBusHelper, SIGNAL(pathForSettingsRemoved(const QString &)), this,SIGNAL(removed( const QString &))); if (!QDBusConnection::systemBus().connect(d->service, d->path, QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION), QLatin1String("Removed"), nmDBusHelper, SIGNAL(slotSettingsRemoved()))) { allOk = true; } return allOk; }