Changeset View
Changeset View
Standalone View
Standalone View
src/modemdevice.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
48 | { | 48 | { | ||
49 | Q_D(ModemDevice); | 49 | Q_D(ModemDevice); | ||
50 | 50 | | |||
51 | QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->modemIface.staticInterfaceName(), path); | 51 | QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->modemIface.staticInterfaceName(), path); | ||
52 | if (!initialProperties.isEmpty()) { | 52 | if (!initialProperties.isEmpty()) { | ||
53 | d->propertiesChanged(initialProperties); | 53 | d->propertiesChanged(initialProperties); | ||
54 | } | 54 | } | ||
55 | 55 | | |||
56 | #if NM_CHECK_VERSION(1, 4, 0) | | |||
57 | QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, | 56 | QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, | ||
58 | QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); | 57 | QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); | ||
59 | #else | | |||
60 | QObject::connect(&d->modemIface, &OrgFreedesktopNetworkManagerDeviceModemInterface::PropertiesChanged, d, &ModemDevicePrivate::propertiesChanged); | | |||
61 | #endif | | |||
62 | } | 58 | } | ||
63 | 59 | | |||
64 | NetworkManager::ModemDevice::ModemDevice(NetworkManager::ModemDevicePrivate &dd, QObject *parent) | 60 | NetworkManager::ModemDevice::ModemDevice(NetworkManager::ModemDevicePrivate &dd, QObject *parent) | ||
65 | : Device(dd, parent) | 61 | : Device(dd, parent) | ||
66 | { | 62 | { | ||
67 | Q_D(ModemDevice); | 63 | Q_D(ModemDevice); | ||
68 | 64 | | |||
69 | #if NM_CHECK_VERSION(1, 4, 0) | | |||
70 | QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, | 65 | QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, | ||
71 | QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); | 66 | QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); | ||
72 | #else | | |||
73 | QObject::connect(&d->modemIface, &OrgFreedesktopNetworkManagerDeviceModemInterface::PropertiesChanged, d, &ModemDevicePrivate::propertiesChanged); | | |||
74 | #endif | | |||
75 | } | 67 | } | ||
76 | 68 | | |||
77 | NetworkManager::ModemDevice::~ModemDevice() | 69 | NetworkManager::ModemDevice::~ModemDevice() | ||
78 | { | 70 | { | ||
79 | } | 71 | } | ||
80 | 72 | | |||
81 | NetworkManager::Device::Type NetworkManager::ModemDevice::type() const | 73 | NetworkManager::Device::Type NetworkManager::ModemDevice::type() const | ||
82 | { | 74 | { | ||
Show All 28 Lines |