QNI:NetworkManager: Update dbus interface usage
We were using the non-standard interface for PropertiesChanged, and support for this was dropped in a Network Manager update earlier this year[0]. Switch to using the standard interface. [0] https://networkmanager.dev/blog/networkmanager-1-32/ Pick-to: 6.2 Change-Id: Ibdf2b635ae13a3150c4d2faa028c15c70c8af5ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
This commit is contained in:
parent
5d2fa94297
commit
5d941c7660
@ -93,16 +93,16 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
|
||||
|
||||
QDBusConnection::systemBus().connect(
|
||||
QLatin1String(NM_DBUS_SERVICE), QLatin1String(NM_DBUS_PATH),
|
||||
QLatin1String(NM_DBUS_INTERFACE), QLatin1String("PropertiesChanged"), this,
|
||||
SLOT(setProperties(QMap<QString, QVariant>)));
|
||||
QLatin1String(DBUS_PROPERTIES_INTERFACE), QLatin1String("PropertiesChanged"), this,
|
||||
SLOT(setProperties(QString, QMap<QString, QVariant>, QList<QString>)));
|
||||
}
|
||||
|
||||
QNetworkManagerInterface::~QNetworkManagerInterface()
|
||||
{
|
||||
QDBusConnection::systemBus().disconnect(
|
||||
QLatin1String(NM_DBUS_SERVICE), QLatin1String(NM_DBUS_PATH),
|
||||
QLatin1String(NM_DBUS_INTERFACE), QLatin1String("PropertiesChanged"), this,
|
||||
SLOT(setProperties(QMap<QString, QVariant>)));
|
||||
QLatin1String(DBUS_PROPERTIES_INTERFACE), QLatin1String("PropertiesChanged"), this,
|
||||
SLOT(setProperties(QString, QMap<QString, QVariant>, QList<QString>)));
|
||||
}
|
||||
|
||||
QNetworkManagerInterface::NMState QNetworkManagerInterface::state() const
|
||||
@ -147,8 +147,13 @@ auto QNetworkManagerInterface::extractDeviceType(QDBusObjectPath devicePath) con
|
||||
return static_cast<NMDeviceType>(deviceType.toUInt());
|
||||
}
|
||||
|
||||
void QNetworkManagerInterface::setProperties(const QMap<QString, QVariant> &map)
|
||||
void QNetworkManagerInterface::setProperties(const QString &interfaceName,
|
||||
const QMap<QString, QVariant> &map,
|
||||
const QStringList &invalidatedProperties)
|
||||
{
|
||||
Q_UNUSED(interfaceName);
|
||||
Q_UNUSED(invalidatedProperties);
|
||||
|
||||
for (auto i = map.cbegin(), end = map.cend(); i != end; ++i) {
|
||||
bool valueChanged = true;
|
||||
|
||||
|
@ -164,7 +164,8 @@ Q_SIGNALS:
|
||||
void deviceTypeChanged(NMDeviceType);
|
||||
|
||||
private Q_SLOTS:
|
||||
void setProperties(const QMap<QString, QVariant> &map);
|
||||
void setProperties(const QString &interfaceName, const QMap<QString, QVariant> &map,
|
||||
const QStringList &invalidatedProperties);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY_MOVE(QNetworkManagerInterface)
|
||||
|
Loading…
Reference in New Issue
Block a user