Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Rings:1-MinimalX
libKF5NetworkManagerQt
0001-Revert-Require-NetworkManager-1.4.0-and-ne...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Revert-Require-NetworkManager-1.4.0-and-newer.patch of Package libKF5NetworkManagerQt
From e10bf7b5afcbe696d198f5b5f30681ac09990a38 Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer <wbauer@tmo.at> Date: Fri, 14 Sep 2018 16:45:26 +0200 Subject: [PATCH] Revert "Require NetworkManager 1.4.0 and newer" This reverts commit d5d45a61e3248ecfd7dfd90ad75aed56964b023e to make it build on Leap 42.3 which only has NetworkManager 1.0. --- CMakeLists.txt | 2 +- autotests/settings/8021xsettingtest.cpp | 4 ++++ autotests/settings/bridgesettingtest.cpp | 4 ++++ autotests/settings/connectionsettingtest.cpp | 13 +++++++++++++ autotests/settings/gsmsettingtest.cpp | 6 ++++++ autotests/settings/vpnsettingtest.cpp | 5 +++++ autotests/settings/wiredsettingtest.cpp | 9 +++++++++ autotests/settings/wirelesssettingtest.cpp | 10 ++++++++++ src/accesspoint.cpp | 4 ++++ src/activeconnection.cpp | 8 ++++++++ src/adsldevice.cpp | 4 ++++ src/bluetoothdevice.cpp | 4 ++++ src/bonddevice.cpp | 4 ++++ src/bridgedevice.cpp | 4 ++++ src/connection.cpp | 5 ++++- src/devicestatistics.cpp | 4 ++++ src/dhcp4config.cpp | 5 ++++- src/dhcp6config.cpp | 6 ++++-- src/genericdevice.cpp | 4 ++++ src/gredevice.cpp | 4 ++++ src/infinibanddevice.cpp | 4 ++++ src/iptunneldevice.cpp | 4 ++++ src/macvlandevice.cpp | 4 ++++ src/manager.cpp | 5 +++++ src/modemdevice.cpp | 8 ++++++++ src/olpcmeshdevice.cpp | 4 ++++ src/settings.cpp | 5 +++++ src/settings/bridgesetting.cpp | 4 ++++ src/settings/connectionsettings.cpp | 13 +++++++++++++ src/settings/gsmsetting.cpp | 6 ++++++ src/settings/security8021xsetting.cpp | 4 ++++ src/settings/tunsetting.cpp | 11 +++++++++++ src/settings/vpnsetting.cpp | 5 +++++ src/settings/wiredsetting.cpp | 9 +++++++++ src/settings/wirelesssetting.cpp | 9 +++++++++ src/teamdevice.cpp | 4 ++++ src/tundevice.cpp | 4 ++++ src/vethdevice.cpp | 4 ++++ src/vlandevice.cpp | 4 ++++ src/vpnconnection.cpp | 4 ++++ src/wimaxdevice.cpp | 4 ++++ src/wireddevice.cpp | 4 ++++ src/wirelessdevice.cpp | 4 ++++ 43 files changed, 231 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 713bcc7..0fb317d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKA set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) -find_package(NetworkManager 1.4.0 REQUIRED) +find_package(NetworkManager 1.0.0 REQUIRED) include(KDEInstallDirs) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) diff --git a/autotests/settings/8021xsettingtest.cpp b/autotests/settings/8021xsettingtest.cpp index 9af3cee..f7b9938 100644 --- a/autotests/settings/8021xsettingtest.cpp +++ b/autotests/settings/8021xsettingtest.cpp @@ -24,6 +24,10 @@ #include <libnm/NetworkManager.h> +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH "domain-suffix-match" +#endif + #include <QTest> void Security8021xSettingTest::testSetting_data() diff --git a/autotests/settings/bridgesettingtest.cpp b/autotests/settings/bridgesettingtest.cpp index d867004..638a8ca 100644 --- a/autotests/settings/bridgesettingtest.cpp +++ b/autotests/settings/bridgesettingtest.cpp @@ -24,6 +24,10 @@ #include <libnm/NetworkManager.h> +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_BRIDGE_MULTICAST_SNOOPING "multicast-snooping" +#endif + #include <QTest> void BridgeSettingTest::testSetting_data() diff --git a/autotests/settings/connectionsettingtest.cpp b/autotests/settings/connectionsettingtest.cpp index 21837cf..70958ca 100644 --- a/autotests/settings/connectionsettingtest.cpp +++ b/autotests/settings/connectionsettingtest.cpp @@ -24,6 +24,19 @@ #include <libnm/NetworkManager.h> +#if !NM_CHECK_VERSION(1, 0, 6) +#define NM_SETTING_CONNECTION_METERED "metered" +#endif + +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_TUN_SETTING_NAME "tun" +#define NM_SETTING_CONNECTION_LLDP "lldp" +#endif + +#if !NM_CHECK_VERSION(1, 4, 0) +#define NM_SETTING_CONNECTION_STABLE_ID "stable-id" +#endif + #if !NM_CHECK_VERSION(1, 6, 0) #define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries" #endif diff --git a/autotests/settings/gsmsettingtest.cpp b/autotests/settings/gsmsettingtest.cpp index 7217ef0..dd15fce 100644 --- a/autotests/settings/gsmsettingtest.cpp +++ b/autotests/settings/gsmsettingtest.cpp @@ -24,6 +24,12 @@ #include <libnm/NetworkManager.h> +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_GSM_DEVICE_ID "device-id" +#define NM_SETTING_GSM_SIM_ID "sim-id" +#define NM_SETTING_GSM_SIM_OPERATOR_ID "sim-operator-id" +#endif + #include <QTest> void GsmSettingTest::testSetting_data() diff --git a/autotests/settings/vpnsettingtest.cpp b/autotests/settings/vpnsettingtest.cpp index 6d9d47a..a0aa898 100644 --- a/autotests/settings/vpnsettingtest.cpp +++ b/autotests/settings/vpnsettingtest.cpp @@ -24,6 +24,11 @@ #include <libnm/NetworkManager.h> +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_VPN_PERSISTENT "persistent" +#define NM_SETTING_VPN_TIMEOUT "timeout" +#endif + #include <QTest> void VpnSettingTest::testSetting_data() diff --git a/autotests/settings/wiredsettingtest.cpp b/autotests/settings/wiredsettingtest.cpp index cdd74ed..182fc45 100644 --- a/autotests/settings/wiredsettingtest.cpp +++ b/autotests/settings/wiredsettingtest.cpp @@ -25,6 +25,15 @@ #include <libnm/NetworkManager.h> +#if !NM_CHECK_VERSION(1, 0, 6) +#define NM_SETTING_WIRED_WAKE_ON_LAN "wake-on-lan" +#define NM_SETTING_WIRED_WAKE_ON_LAN_PASSWORD "wake-on-lan-password" +#endif + +#if !NM_CHECK_VERSION(1, 4, 0) +#define NM_SETTING_WIRED_GENERATE_MAC_ADDRESS_MASK "generate-mac-address-mask" +#endif + #include <QTest> void WiredSettingTest::testSetting_data() diff --git a/autotests/settings/wirelesssettingtest.cpp b/autotests/settings/wirelesssettingtest.cpp index d879b62..34e8ac4 100644 --- a/autotests/settings/wirelesssettingtest.cpp +++ b/autotests/settings/wirelesssettingtest.cpp @@ -26,6 +26,16 @@ #define NM_SETTING_WIRELESS_ASSIGNED_MAC_ADDRESS "assigned-mac-address" +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION "mac-address-randomization" +#define NM_SETTING_WIRELESS_POWERSAVE "powersave" +#endif + +#if !NM_CHECK_VERSION(1, 4, 0) +#define NM_SETTING_WIRELESS_GENERATE_MAC_ADDRESS_MASK "generate-mac-address-mask" +#endif + + #include <QTest> void WirelessSettingTest::testSetting_data() diff --git a/src/accesspoint.cpp b/src/accesspoint.cpp index 5acdb5a..2ac620c 100644 --- a/src/accesspoint.cpp +++ b/src/accesspoint.cpp @@ -72,8 +72,12 @@ NetworkManager::AccessPoint::AccessPoint(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerAccessPointInterface::PropertiesChanged, d, &AccessPointPrivate::propertiesChanged); +#endif } NetworkManager::AccessPoint::~AccessPoint() diff --git a/src/activeconnection.cpp b/src/activeconnection.cpp index ea210f9..db6f476 100644 --- a/src/activeconnection.cpp +++ b/src/activeconnection.cpp @@ -67,8 +67,12 @@ NetworkManager::ActiveConnection::ActiveConnection(const QString &path, QObject } #ifndef NMQT_STATIC +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerConnectionActiveInterface::PropertiesChanged, d, &ActiveConnectionPrivate::propertiesChanged); +#endif #endif #ifdef NMQT_STATIC @@ -90,8 +94,12 @@ NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd, Q_D(ActiveConnection); #ifndef NMQT_STATIC +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerConnectionActiveInterface::PropertiesChanged, d, &ActiveConnectionPrivate::propertiesChanged); +#endif #endif #ifdef NMQT_STATIC diff --git a/src/adsldevice.cpp b/src/adsldevice.cpp index fc81305..fa4b62f 100644 --- a/src/adsldevice.cpp +++ b/src/adsldevice.cpp @@ -46,8 +46,12 @@ NetworkManager::AdslDevice::AdslDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceAdslInterface::PropertiesChanged, d, &AdslDevicePrivate::propertiesChanged); +#endif } NetworkManager::AdslDevicePrivate::~AdslDevicePrivate() diff --git a/src/bluetoothdevice.cpp b/src/bluetoothdevice.cpp index de6c22a..c80c71e 100644 --- a/src/bluetoothdevice.cpp +++ b/src/bluetoothdevice.cpp @@ -45,8 +45,12 @@ NetworkManager::BluetoothDevice::BluetoothDevice(const QString &path, QObject *p d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->btIface, &OrgFreedesktopNetworkManagerDeviceBluetoothInterface::PropertiesChanged, d, &BluetoothDevicePrivate::propertiesChanged); +#endif } NetworkManager::BluetoothDevice::~BluetoothDevice() diff --git a/src/bonddevice.cpp b/src/bonddevice.cpp index 9b89590..e10c7d7 100644 --- a/src/bonddevice.cpp +++ b/src/bonddevice.cpp @@ -48,8 +48,12 @@ NetworkManager::BondDevice::BondDevice(const QString &path, QObject *parent): d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceBondInterface::PropertiesChanged, d, &BondDevicePrivate::propertiesChanged); +#endif } NetworkManager::BondDevicePrivate::~BondDevicePrivate() diff --git a/src/bridgedevice.cpp b/src/bridgedevice.cpp index 6266707..48dfb50 100644 --- a/src/bridgedevice.cpp +++ b/src/bridgedevice.cpp @@ -46,8 +46,12 @@ NetworkManager::BridgeDevice::BridgeDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceBridgeInterface::PropertiesChanged, d, &BridgeDevicePrivate::propertiesChanged); +#endif } NetworkManager::BridgeDevice::~BridgeDevice() diff --git a/src/connection.cpp b/src/connection.cpp index bc05855..d6efd9c 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -61,9 +61,12 @@ NetworkManager::Connection::Connection(const QString &path, QObject *parent) connect(&d->iface, &OrgFreedesktopNetworkManagerSettingsConnectionInterface::Updated, d, &ConnectionPrivate::onConnectionUpdated); connect(&d->iface, &OrgFreedesktopNetworkManagerSettingsConnectionInterface::Removed, d, &ConnectionPrivate::onConnectionRemoved); d->unsaved = d->iface.unsaved(); - +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerSettingsConnectionInterface::PropertiesChanged, d, &ConnectionPrivate::onPropertiesChanged); +#endif } NetworkManager::Connection::~Connection() diff --git a/src/devicestatistics.cpp b/src/devicestatistics.cpp index 011806b..cd106c8 100644 --- a/src/devicestatistics.cpp +++ b/src/devicestatistics.cpp @@ -48,8 +48,12 @@ NetworkManager::DeviceStatistics::DeviceStatistics(const QString &path, QObject d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceStatisticsInterface::PropertiesChanged, d, &DeviceStatisticsPrivate::propertiesChanged); +#endif } NetworkManager::DeviceStatistics::~DeviceStatistics() diff --git a/src/dhcp4config.cpp b/src/dhcp4config.cpp index d98fe90..c52cc00 100644 --- a/src/dhcp4config.cpp +++ b/src/dhcp4config.cpp @@ -44,9 +44,12 @@ NetworkManager::Dhcp4Config::Dhcp4Config(const QString &path, QObject *owner) { Q_D(Dhcp4Config); Q_UNUSED(owner); - +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->myPath, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->dhcp4Iface, &OrgFreedesktopNetworkManagerDHCP4ConfigInterface::PropertiesChanged, d, &Dhcp4ConfigPrivate::dhcp4PropertiesChanged); +#endif d->options = d->dhcp4Iface.options(); } diff --git a/src/dhcp6config.cpp b/src/dhcp6config.cpp index 70ecb8c..c0a4d2a 100644 --- a/src/dhcp6config.cpp +++ b/src/dhcp6config.cpp @@ -43,10 +43,12 @@ NetworkManager::Dhcp6Config::Dhcp6Config(const QString &path, QObject *owner) { Q_D(Dhcp6Config); Q_UNUSED(owner); - +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); - +#else + connect(&d->dhcp6Iface, &OrgFreedesktopNetworkManagerDHCP6ConfigInterface::PropertiesChanged, d, &Dhcp6ConfigPrivate::dhcp6PropertiesChanged); +#endif d->options = d->dhcp6Iface.options(); } diff --git a/src/genericdevice.cpp b/src/genericdevice.cpp index edcc056..8c36661 100644 --- a/src/genericdevice.cpp +++ b/src/genericdevice.cpp @@ -46,8 +46,12 @@ NetworkManager::GenericDevice::GenericDevice(const QString &path, QObject *paren d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceGenericInterface::PropertiesChanged, d, &GenericDevicePrivate::propertiesChanged); +#endif } NetworkManager::GenericDevice::~GenericDevice() diff --git a/src/gredevice.cpp b/src/gredevice.cpp index f9e6985..c882012 100644 --- a/src/gredevice.cpp +++ b/src/gredevice.cpp @@ -47,8 +47,12 @@ NetworkManager::GreDevice::GreDevice(const QString &path, QObject *parent): d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceGreInterface::PropertiesChanged, d, &GreDevicePrivate::propertiesChanged); +#endif } NetworkManager::GreDevice::~GreDevice() diff --git a/src/infinibanddevice.cpp b/src/infinibanddevice.cpp index d9e8726..4c891aa 100644 --- a/src/infinibanddevice.cpp +++ b/src/infinibanddevice.cpp @@ -48,8 +48,12 @@ NetworkManager::InfinibandDevice::InfinibandDevice(const QString &path, QObject d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceInfinibandInterface::PropertiesChanged, d, &InfinibandDevicePrivate::propertiesChanged); +#endif } NetworkManager::InfinibandDevicePrivate::~InfinibandDevicePrivate() diff --git a/src/iptunneldevice.cpp b/src/iptunneldevice.cpp index a997899..8845552 100644 --- a/src/iptunneldevice.cpp +++ b/src/iptunneldevice.cpp @@ -46,8 +46,12 @@ NetworkManager::IpTunnelDevice::IpTunnelDevice(const QString &path, QObject *par d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceIPTunnelInterface::PropertiesChanged, d, &IpTunnelDevicePrivate::propertiesChanged); +#endif } NetworkManager::IpTunnelDevice::~IpTunnelDevice() diff --git a/src/macvlandevice.cpp b/src/macvlandevice.cpp index 3ea1524..63b8679 100644 --- a/src/macvlandevice.cpp +++ b/src/macvlandevice.cpp @@ -46,8 +46,12 @@ NetworkManager::MacVlanDevice::MacVlanDevice(const QString &path, QObject *paren d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceMacvlanInterface::PropertiesChanged, d, &MacVlanDevicePrivate::propertiesChanged); +#endif } NetworkManager::MacVlanDevice::~MacVlanDevice() diff --git a/src/manager.cpp b/src/manager.cpp index 8961420..fff734b 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -100,8 +100,13 @@ NetworkManager::NetworkManagerPrivate::NetworkManagerPrivate() #ifndef NMQT_STATIC +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, NetworkManagerPrivate::DBUS_DAEMON_PATH, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), this, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&iface, &OrgFreedesktopNetworkManagerInterface::PropertiesChanged, + this, &NetworkManagerPrivate::propertiesChanged); +#endif #else connect(&iface, &OrgFreedesktopNetworkManagerInterface::PropertiesChanged, this, &NetworkManagerPrivate::propertiesChanged); diff --git a/src/modemdevice.cpp b/src/modemdevice.cpp index 82f0db5..cbf8aff 100644 --- a/src/modemdevice.cpp +++ b/src/modemdevice.cpp @@ -53,8 +53,12 @@ NetworkManager::ModemDevice::ModemDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + QObject::connect(&d->modemIface, &OrgFreedesktopNetworkManagerDeviceModemInterface::PropertiesChanged, d, &ModemDevicePrivate::propertiesChanged); +#endif } NetworkManager::ModemDevice::ModemDevice(NetworkManager::ModemDevicePrivate &dd, QObject *parent) @@ -62,8 +66,12 @@ NetworkManager::ModemDevice::ModemDevice(NetworkManager::ModemDevicePrivate &dd, { Q_D(ModemDevice); +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + QObject::connect(&d->modemIface, &OrgFreedesktopNetworkManagerDeviceModemInterface::PropertiesChanged, d, &ModemDevicePrivate::propertiesChanged); +#endif } NetworkManager::ModemDevice::~ModemDevice() diff --git a/src/olpcmeshdevice.cpp b/src/olpcmeshdevice.cpp index 1997ccf..af13dc4 100644 --- a/src/olpcmeshdevice.cpp +++ b/src/olpcmeshdevice.cpp @@ -45,8 +45,12 @@ NetworkManager::OlpcMeshDevice::OlpcMeshDevice(const QString &path, QObject *par d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceOlpcMeshInterface::PropertiesChanged, d, &OlpcMeshDevicePrivate::propertiesChanged); +#endif } NetworkManager::OlpcMeshDevice::~OlpcMeshDevice() diff --git a/src/settings.cpp b/src/settings.cpp index 4fdc63f..286cb7a 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -42,8 +42,13 @@ NetworkManager::SettingsPrivate::SettingsPrivate() #endif , m_canModify(true) { +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, NetworkManagerPrivate::DBUS_SETTINGS_PATH, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), this, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&iface, &OrgFreedesktopNetworkManagerSettingsInterface::PropertiesChanged, + this, &SettingsPrivate::propertiesChanged); +#endif connect(&iface, &OrgFreedesktopNetworkManagerSettingsInterface::NewConnection, this, &SettingsPrivate::onConnectionAdded); connect(&iface, &OrgFreedesktopNetworkManagerSettingsInterface::ConnectionRemoved, diff --git a/src/settings/bridgesetting.cpp b/src/settings/bridgesetting.cpp index 935de62..9bff9dd 100644 --- a/src/settings/bridgesetting.cpp +++ b/src/settings/bridgesetting.cpp @@ -23,6 +23,10 @@ #define NM_SETTING_BRIDGE_INTERFACE_NAME "interface-name" +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_BRIDGE_MULTICAST_SNOOPING "multicast-snooping" +#endif + #include <QDebug> NetworkManager::BridgeSettingPrivate::BridgeSettingPrivate() diff --git a/src/settings/connectionsettings.cpp b/src/settings/connectionsettings.cpp index 3a35571..b2db768 100644 --- a/src/settings/connectionsettings.cpp +++ b/src/settings/connectionsettings.cpp @@ -49,6 +49,19 @@ #undef signals #include <libnm/NetworkManager.h> +#if !NM_CHECK_VERSION(1, 0, 6) +#define NM_SETTING_CONNECTION_METERED "metered" +#endif + +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_TUN_SETTING_NAME "tun" +#define NM_SETTING_CONNECTION_LLDP "lldp" +#endif + +#if !NM_CHECK_VERSION(1, 4, 0) +#define NM_SETTING_CONNECTION_STABLE_ID "stable-id" +#endif + #if !NM_CHECK_VERSION(1, 6, 0) #define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries" #endif diff --git a/src/settings/gsmsetting.cpp b/src/settings/gsmsetting.cpp index f17fcf2..7ef1970 100644 --- a/src/settings/gsmsetting.cpp +++ b/src/settings/gsmsetting.cpp @@ -24,6 +24,12 @@ #define NM_SETTING_GSM_NETWORK_TYPE "network-type" #define NM_SETTING_GSM_ALLOWED_BANDS "allowed-bands" +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_GSM_DEVICE_ID "device-id" +#define NM_SETTING_GSM_SIM_ID "sim-id" +#define NM_SETTING_GSM_SIM_OPERATOR_ID "sim-operator-id" +#endif + #include <QDebug> NetworkManager::GsmSettingPrivate::GsmSettingPrivate() diff --git a/src/settings/security8021xsetting.cpp b/src/settings/security8021xsetting.cpp index aaaeb13..064823e 100644 --- a/src/settings/security8021xsetting.cpp +++ b/src/settings/security8021xsetting.cpp @@ -21,6 +21,10 @@ #include "security8021xsetting.h" #include "security8021xsetting_p.h" +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_802_1X_DOMAIN_SUFFIX_MATCH "domain-suffix-match" +#endif + #include <QDebug> NetworkManager::Security8021xSettingPrivate::Security8021xSettingPrivate() diff --git a/src/settings/tunsetting.cpp b/src/settings/tunsetting.cpp index 2c8c26a..b9aeb55 100644 --- a/src/settings/tunsetting.cpp +++ b/src/settings/tunsetting.cpp @@ -21,6 +21,17 @@ #include "tunsetting.h" #include "tunsetting_p.h" +#if !NM_CHECK_VERSION(1, 1, 92) +#define NM_SETTING_TUN_SETTING_NAME "tun" + +#define NM_SETTING_TUN_MODE "mode" +#define NM_SETTING_TUN_OWNER "owner" +#define NM_SETTING_TUN_GROUP "group" +#define NM_SETTING_TUN_PI "pi" +#define NM_SETTING_TUN_VNET_HDR "vnet-hdr" +#define NM_SETTING_TUN_MULTI_QUEUE "multi-queue" +#endif + #include <QDebug> NetworkManager::TunSettingPrivate::TunSettingPrivate() diff --git a/src/settings/vpnsetting.cpp b/src/settings/vpnsetting.cpp index 2a68321..5a606b3 100644 --- a/src/settings/vpnsetting.cpp +++ b/src/settings/vpnsetting.cpp @@ -22,6 +22,11 @@ #include "vpnsetting_p.h" #include "nmdebug.h" +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_VPN_PERSISTENT "persistent" +#define NM_SETTING_VPN_TIMEOUT "timeout" +#endif + NetworkManager::VpnSettingPrivate::VpnSettingPrivate() : name(NM_SETTING_VPN_SETTING_NAME) , persistent(false) diff --git a/src/settings/wiredsetting.cpp b/src/settings/wiredsetting.cpp index c5d2e2f..0da63be 100644 --- a/src/settings/wiredsetting.cpp +++ b/src/settings/wiredsetting.cpp @@ -22,6 +22,15 @@ #include "wiredsetting_p.h" #include "manager.h" +#if !NM_CHECK_VERSION(1, 0, 6) +#define NM_SETTING_WIRED_WAKE_ON_LAN "wake-on-lan" +#define NM_SETTING_WIRED_WAKE_ON_LAN_PASSWORD "wake-on-lan-password" +#endif + +#if !NM_CHECK_VERSION(1, 4, 0) +#define NM_SETTING_WIRED_GENERATE_MAC_ADDRESS_MASK "generate-mac-address-mask" +#endif + #include <QDebug> NetworkManager::WiredSettingPrivate::WiredSettingPrivate() diff --git a/src/settings/wirelesssetting.cpp b/src/settings/wirelesssetting.cpp index e780a4a..6eb7035 100644 --- a/src/settings/wirelesssetting.cpp +++ b/src/settings/wirelesssetting.cpp @@ -27,6 +27,15 @@ #define NM_SETTING_WIRELESS_SEC "security" #define NM_SETTING_WIRELESS_ASSIGNED_MAC_ADDRESS "assigned-mac-address" +#if !NM_CHECK_VERSION(1, 2, 0) +#define NM_SETTING_WIRELESS_MAC_ADDRESS_RANDOMIZATION "mac-address-randomization" +#define NM_SETTING_WIRELESS_POWERSAVE "powersave" +#endif + +#if !NM_CHECK_VERSION(1, 4, 0) +#define NM_SETTING_WIRELESS_GENERATE_MAC_ADDRESS_MASK "generate-mac-address-mask" +#endif + #include <QDebug> NetworkManager::WirelessSettingPrivate::WirelessSettingPrivate() diff --git a/src/teamdevice.cpp b/src/teamdevice.cpp index 62254f5..c8d1cbb 100644 --- a/src/teamdevice.cpp +++ b/src/teamdevice.cpp @@ -48,8 +48,12 @@ NetworkManager::TeamDevice::TeamDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceTeamInterface::PropertiesChanged, d, &TeamDevicePrivate::propertiesChanged); +#endif } NetworkManager::TeamDevice::~TeamDevice() diff --git a/src/tundevice.cpp b/src/tundevice.cpp index bcc6d64..ff79995 100644 --- a/src/tundevice.cpp +++ b/src/tundevice.cpp @@ -46,8 +46,12 @@ NetworkManager::TunDevice::TunDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceTunInterface::PropertiesChanged, d, &TunDevicePrivate::propertiesChanged); +#endif } NetworkManager::TunDevice::~TunDevice() diff --git a/src/vethdevice.cpp b/src/vethdevice.cpp index 51d9c36..a21efd6 100644 --- a/src/vethdevice.cpp +++ b/src/vethdevice.cpp @@ -48,8 +48,12 @@ NetworkManager::VethDevice::VethDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceVethInterface::PropertiesChanged, d, &VethDevicePrivate::propertiesChanged); +#endif } NetworkManager::VethDevice::~VethDevice() diff --git a/src/vlandevice.cpp b/src/vlandevice.cpp index 6ece2e0..93c6d00 100644 --- a/src/vlandevice.cpp +++ b/src/vlandevice.cpp @@ -47,8 +47,12 @@ NetworkManager::VlanDevice::VlanDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceVlanInterface::PropertiesChanged, d, &VlanDevicePrivate::propertiesChanged); +#endif } NetworkManager::VlanDevicePrivate::~VlanDevicePrivate() diff --git a/src/vpnconnection.cpp b/src/vpnconnection.cpp index 7fdc51f..b046f36 100644 --- a/src/vpnconnection.cpp +++ b/src/vpnconnection.cpp @@ -69,8 +69,12 @@ NetworkManager::VpnConnection::VpnConnection(const QString &path, QObject *paren } } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->iface, &OrgFreedesktopNetworkManagerVPNConnectionInterface::PropertiesChanged, d, &VpnConnectionPrivate::propertiesChanged); +#endif connect(&d->iface, &OrgFreedesktopNetworkManagerVPNConnectionInterface::VpnStateChanged, d, &VpnConnectionPrivate::vpnStateChanged); } diff --git a/src/wimaxdevice.cpp b/src/wimaxdevice.cpp index d25d00d..cd39cdf 100644 --- a/src/wimaxdevice.cpp +++ b/src/wimaxdevice.cpp @@ -52,8 +52,12 @@ NetworkManager::WimaxDevice::WimaxDevice(const QString &path, QObject *parent) d->propertiesChanged(initialProperties); } +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->wimaxIface, &OrgFreedesktopNetworkManagerDeviceWiMaxInterface::PropertiesChanged, d, &WimaxDevicePrivate::propertiesChanged); +#endif connect(&d->wimaxIface, &OrgFreedesktopNetworkManagerDeviceWiMaxInterface::NspAdded, d, &WimaxDevicePrivate::nspAdded); connect(&d->wimaxIface, &OrgFreedesktopNetworkManagerDeviceWiMaxInterface::NspRemoved, d, &WimaxDevicePrivate::nspRemoved); } diff --git a/src/wireddevice.cpp b/src/wireddevice.cpp index 66bd82b..a2ad615 100644 --- a/src/wireddevice.cpp +++ b/src/wireddevice.cpp @@ -54,8 +54,12 @@ NetworkManager::WiredDevice::WiredDevice(const QString &path, QObject *parent) } #ifndef NMQT_STATIC +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->wiredIface, &OrgFreedesktopNetworkManagerDeviceWiredInterface::PropertiesChanged, d, &WiredDevicePrivate::propertiesChanged); +#endif #endif #ifdef NMQT_STATIC diff --git a/src/wirelessdevice.cpp b/src/wirelessdevice.cpp index 833ab47..5b67dce 100644 --- a/src/wirelessdevice.cpp +++ b/src/wirelessdevice.cpp @@ -64,8 +64,12 @@ NetworkManager::WirelessDevice::WirelessDevice(const QString &path, QObject *par } #ifndef NMQT_STATIC +#if NM_CHECK_VERSION(1, 4, 0) QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES, QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList))); +#else + connect(&d->wirelessIface, &OrgFreedesktopNetworkManagerDeviceWirelessInterface::PropertiesChanged, d, &WirelessDevicePrivate::propertiesChanged); +#endif #endif #ifdef NMQT_STATIC -- 2.13.7
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor