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-Add-missing-ipv4-setting-options.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Revert-Add-missing-ipv4-setting-options.patch of Package libKF5NetworkManagerQt
From ec5a2e3ff51ebe56a66fe1fd4670f4a93ebded60 Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer <wbauer@tmo.at> Date: Mon, 12 Nov 2018 11:33:31 +0100 Subject: [PATCH] Revert "Add missing ipv4 setting options" This reverts commit b2244600b00cef0a85b3055c78b4a7af38197cab. It needs a newer NetworkManager than we have in openSUSE Leap 42.3. --- autotests/settings/ipv4settingtest.cpp | 58 +---------- src/settings/ipv4setting.cpp | 181 --------------------------------- src/settings/ipv4setting.h | 28 ----- src/settings/ipv4setting_p.h | 7 -- 4 files changed, 2 insertions(+), 272 deletions(-) diff --git a/autotests/settings/ipv4settingtest.cpp b/autotests/settings/ipv4settingtest.cpp index c9434e0..e38af40 100644 --- a/autotests/settings/ipv4settingtest.cpp +++ b/autotests/settings/ipv4settingtest.cpp @@ -44,13 +44,6 @@ void IPv4SettingTest::testSetting_data() QTest::addColumn<QString>("dhcpHostname"); QTest::addColumn<bool>("neverDefault"); QTest::addColumn<bool>("mayFail"); - QTest::addColumn<qint32>("dadTimeout"); - QTest::addColumn<QString>("dhcpFqdn"); - QTest::addColumn<QStringList>("dnsOptions"); - QTest::addColumn<qint32>("dnsPriority"); - QTest::addColumn<QString>("gateway"); - QTest::addColumn<NMVariantMapList>("addressData"); - QTest::addColumn<NMVariantMapList>("routeData"); QList<uint> dns; dns << inet_addr("10.0.0.1"); @@ -75,26 +68,6 @@ void IPv4SettingTest::testSetting_data() routeAddr << 25; routes << routeAddr; - QStringList dnsOptions; - dnsOptions << "opt1"; - dnsOptions << "opt2"; - - NMVariantMapList addressData; - QVariantMap addressMap; - addressMap["address"] = "192.168.1.1"; - addressMap["prefix"] = 25; - addressData.append(addressMap); - - NMVariantMapList routeData; - QVariantMap routeMap; - routeMap["dest"] = "192.168.1.1"; - routeMap["prefix"] = 25; - routeData.append(routeMap); - routeMap.clear(); - routeMap["dest"] = "192.168.1.2"; - routeMap["prefix"] = 25; - routeData.append(routeMap); - QTest::newRow("setting1") << QString("auto") // method << dns // dns @@ -108,14 +81,7 @@ void IPv4SettingTest::testSetting_data() << false // dhcpSendHostname << QString("home-test") // dhcpHostname << true // neverDefault - << false // mayFail - << 100 // dadTimeout - << QString("foo.com") // dhcpFqdn - << dnsOptions // dnsOptions - << 100 // dnsPriority - << QString("1.1.1.1") // gateway - << addressData // addressData - << routeData; // routeData + << false; // mayFail } void IPv4SettingTest::testSetting() @@ -133,13 +99,6 @@ void IPv4SettingTest::testSetting() QFETCH(QString, dhcpHostname); QFETCH(bool, neverDefault); QFETCH(bool, mayFail); - QFETCH(qint32, dadTimeout); - QFETCH(QString, dhcpFqdn); - QFETCH(QStringList, dnsOptions); - QFETCH(qint32, dnsPriority); - QFETCH(QString, gateway); - QFETCH(NMVariantMapList, addressData); - QFETCH(NMVariantMapList, routeData); QVariantMap map; @@ -156,13 +115,6 @@ void IPv4SettingTest::testSetting() map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DHCP_HOSTNAME), dhcpHostname); map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_NEVER_DEFAULT), neverDefault); map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_MAY_FAIL), mayFail); - map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DAD_TIMEOUT), dadTimeout); - map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DHCP_FQDN), dhcpFqdn); - map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_OPTIONS), dnsOptions); - map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_PRIORITY), dnsPriority); - map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_GATEWAY), gateway); - map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA), QVariant::fromValue(addressData)); - map.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTE_DATA), QVariant::fromValue(routeData)); NetworkManager::Ipv4Setting setting; setting.fromMap(map); @@ -174,9 +126,7 @@ void IPv4SettingTest::testSetting() while (it != map.constEnd()) { if (it.key() != QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS) && it.key() != QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESSES) && - it.key() != QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTES) && - it.key() != QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA) && - it.key() != QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTE_DATA)) { + it.key() != QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTES)) { QCOMPARE(it.value(), map1.value(it.key())); } ++it; @@ -188,10 +138,6 @@ void IPv4SettingTest::testSetting() map1.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESSES)).value<UIntListList>()); QCOMPARE(map.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTES)).value<UIntListList>(), map1.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTES)).value<UIntListList>()); - QCOMPARE(qdbus_cast<NMVariantMapList>(map.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA))), - qdbus_cast<NMVariantMapList>(map1.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA)))); - QCOMPARE(qdbus_cast<NMVariantMapList>(map.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTE_DATA))), - qdbus_cast<NMVariantMapList>(map1.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTE_DATA)))); } QTEST_MAIN(IPv4SettingTest) diff --git a/src/settings/ipv4setting.cpp b/src/settings/ipv4setting.cpp index 4750110..02b2569 100644 --- a/src/settings/ipv4setting.cpp +++ b/src/settings/ipv4setting.cpp @@ -37,8 +37,6 @@ NetworkManager::Ipv4SettingPrivate::Ipv4SettingPrivate() , dhcpSendHostname(true) , neverDefault(false) , mayFail(true) - , dadTimeout(-1) - , dnsPriority(0) { } NetworkManager::Ipv4Setting::Ipv4Setting() @@ -63,12 +61,6 @@ NetworkManager::Ipv4Setting::Ipv4Setting(const Ptr &other) setDhcpHostname(other->dhcpHostname()); setNeverDefault(other->neverDefault()); setMayFail(other->mayFail()); - setDadTimeout(other->dadTimeout()); - setDhcpFqdn(other->dhcpFqdn()); - setDnsOptions(other->dnsOptions()); - setDnsPriority(other->dnsPriority()); - setAddressData(other->addressData()); - setRouteData(other->routeData()); } NetworkManager::Ipv4Setting::~Ipv4Setting() @@ -265,104 +257,6 @@ bool NetworkManager::Ipv4Setting::mayFail() const return d->mayFail; } -void NetworkManager::Ipv4Setting::setDadTimeout(qint32 timeout) -{ - Q_D(Ipv4Setting); - - d->dadTimeout = timeout; -} - -qint32 NetworkManager::Ipv4Setting::dadTimeout() const -{ - Q_D(const Ipv4Setting); - - return d->dadTimeout; -} - -void NetworkManager::Ipv4Setting::setDhcpFqdn(const QString &fqdn) -{ - Q_D(Ipv4Setting); - - d->dhcpFqdn = fqdn; -} - -QString NetworkManager::Ipv4Setting::dhcpFqdn() const -{ - Q_D(const Ipv4Setting); - - return d->dhcpFqdn; -} - -void NetworkManager::Ipv4Setting::setDnsOptions(const QStringList &options) -{ - Q_D(Ipv4Setting); - - d->dnsOptions = options; -} - -QStringList NetworkManager::Ipv4Setting::dnsOptions() const -{ - Q_D(const Ipv4Setting); - - return d->dnsOptions; -} - -void NetworkManager::Ipv4Setting::setDnsPriority(qint32 priority) -{ - Q_D(Ipv4Setting); - - d->dnsPriority = priority; -} - -qint32 NetworkManager::Ipv4Setting::dnsPriority() const -{ - Q_D(const Ipv4Setting); - - return d->dnsPriority; -} - -void NetworkManager::Ipv4Setting::setGateway(const QString &gateway) -{ - Q_D(Ipv4Setting); - - d->gateway = gateway; -} - -QString NetworkManager::Ipv4Setting::gateway() const -{ - Q_D(const Ipv4Setting); - - return d->gateway; -} - -void NetworkManager::Ipv4Setting::setAddressData(const NMVariantMapList &addressData) -{ - Q_D(Ipv4Setting); - - d->addressData = addressData; -} - -NMVariantMapList NetworkManager::Ipv4Setting::addressData() const -{ - Q_D(const Ipv4Setting); - - return d->addressData; -} - -void NetworkManager::Ipv4Setting::setRouteData(const NMVariantMapList &routeData) -{ - Q_D(Ipv4Setting); - - d->routeData = routeData; -} - -NMVariantMapList NetworkManager::Ipv4Setting::routeData() const -{ - Q_D(const Ipv4Setting); - - return d->routeData; -} - void NetworkManager::Ipv4Setting::fromMap(const QVariantMap &setting) { if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_METHOD))) { @@ -496,34 +390,6 @@ void NetworkManager::Ipv4Setting::fromMap(const QVariantMap &setting) if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_MAY_FAIL))) { setMayFail(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_MAY_FAIL)).toBool()); } - - if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_DAD_TIMEOUT))) { - setDadTimeout(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_DAD_TIMEOUT)).toUInt()); - } - - if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_DHCP_FQDN))) { - setDhcpFqdn(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_DHCP_FQDN)).toString()); - } - - if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_OPTIONS))) { - setDnsOptions(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_OPTIONS)).toStringList()); - } - - if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_PRIORITY))) { - setDnsPriority(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_PRIORITY)).toInt()); - } - - if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_GATEWAY))) { - setGateway(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_GATEWAY)).toString()); - } - - if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTE_DATA))) { - setRouteData(qdbus_cast<NMVariantMapList>(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTE_DATA)))); - } - - if (setting.contains(QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA))) { - setAddressData(qdbus_cast<NMVariantMapList>(setting.value(QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA)))); - } } QVariantMap NetworkManager::Ipv4Setting::toMap() const @@ -614,34 +480,6 @@ QVariantMap NetworkManager::Ipv4Setting::toMap() const setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_MAY_FAIL), mayFail()); } - if (dadTimeout() >= 0) { - setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DAD_TIMEOUT), dadTimeout()); - } - - if (!dhcpFqdn().isEmpty()) { - setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DHCP_FQDN), dhcpFqdn()); - } - - if (!dnsOptions().isEmpty()) { - setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_OPTIONS), dnsOptions()); - } - - if (dnsPriority() != 0) { - setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_DNS_PRIORITY), dnsPriority()); - } - - if (!gateway().isEmpty()) { - setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_GATEWAY), gateway()); - } - - if (!addressData().empty()) { - setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA), QVariant::fromValue(addressData())); - } - - if (!routeData().empty()) { - setting.insert(QLatin1String(NMQT_SETTING_IP4_CONFIG_ROUTE_DATA), QVariant::fromValue(routeData())); - } - return setting; } @@ -672,25 +510,6 @@ QDebug NetworkManager::operator <<(QDebug dbg, const NetworkManager::Ipv4Setting dbg.nospace() << NMQT_SETTING_IP4_CONFIG_DHCP_HOSTNAME << ": " << setting.dhcpHostname() << '\n'; dbg.nospace() << NMQT_SETTING_IP4_CONFIG_NEVER_DEFAULT << ": " << setting.neverDefault() << '\n'; dbg.nospace() << NMQT_SETTING_IP4_CONFIG_MAY_FAIL << ": " << setting.mayFail() << '\n'; - dbg.nospace() << NMQT_SETTING_IP4_CONFIG_DAD_TIMEOUT << ": " << setting.dadTimeout() << '\n'; - dbg.nospace() << NMQT_SETTING_IP4_CONFIG_DHCP_FQDN << ": " << setting.dhcpFqdn() << '\n'; - dbg.nospace() << NMQT_SETTING_IP4_CONFIG_DNS_OPTIONS << ": " << setting.dnsOptions() << '\n'; - dbg.nospace() << NMQT_SETTING_IP4_CONFIG_DNS_PRIORITY << ": " << setting.dnsPriority() << '\n'; - dbg.nospace() << NMQT_SETTING_IP4_CONFIG_GATEWAY << ": " << setting.gateway() << '\n'; - dbg.nospace() << NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA << ": " << '\n'; - Q_FOREACH (const QVariantMap & addressData, setting.addressData()) { - QVariantMap::const_iterator i = addressData.constBegin(); - while (i != addressData.constEnd()) { - dbg.nospace() << i.key() << ": " << i.value() << '\n'; - } - } - dbg.nospace() << NMQT_SETTING_IP4_CONFIG_ROUTE_DATA << ": " << '\n'; - Q_FOREACH (const QVariantMap & routeData, setting.routeData()) { - QVariantMap::const_iterator i = routeData.constBegin(); - while (i != routeData.constEnd()) { - dbg.nospace() << i.key() << ": " << i.value() << '\n'; - } - } return dbg.maybeSpace(); } diff --git a/src/settings/ipv4setting.h b/src/settings/ipv4setting.h index 466a627..601f679 100644 --- a/src/settings/ipv4setting.h +++ b/src/settings/ipv4setting.h @@ -48,13 +48,6 @@ #define NMQT_SETTING_IP4_CONFIG_METHOD_MANUAL NM_SETTING_IP4_CONFIG_METHOD_MANUAL #define NMQT_SETTING_IP4_CONFIG_METHOD_SHARED NM_SETTING_IP4_CONFIG_METHOD_SHARED #define NMQT_SETTING_IP4_CONFIG_METHOD_DISABLED NM_SETTING_IP4_CONFIG_METHOD_DISABLED -#define NMQT_SETTING_IP4_CONFIG_DAD_TIMEOUT NM_SETTING_IP_CONFIG_DAD_TIMEOUT -#define NMQT_SETTING_IP4_CONFIG_DHCP_FQDN NM_SETTING_IP4_CONFIG_DHCP_FQDN -#define NMQT_SETTING_IP4_CONFIG_DNS_OPTIONS NM_SETTING_IP_CONFIG_DNS_OPTIONS -#define NMQT_SETTING_IP4_CONFIG_DNS_PRIORITY NM_SETTING_IP_CONFIG_DNS_PRIORITY -#define NMQT_SETTING_IP4_CONFIG_GATEWAY NM_SETTING_IP_CONFIG_GATEWAY -#define NMQT_SETTING_IP4_CONFIG_ROUTE_DATA "route-data" -#define NMQT_SETTING_IP4_CONFIG_ADDRESS_DATA "address-data" namespace NetworkManager @@ -117,27 +110,6 @@ public: void setMayFail(bool mayFail); bool mayFail() const; - void setDadTimeout(qint32 timeout); - qint32 dadTimeout() const; - - void setDhcpFqdn(const QString &fqdn); - QString dhcpFqdn() const; - - void setDnsOptions(const QStringList &options); - QStringList dnsOptions() const; - - void setDnsPriority(qint32 priority); - qint32 dnsPriority() const; - - void setGateway(const QString &gateway); - QString gateway() const; - - void setAddressData(const NMVariantMapList &addressData); - NMVariantMapList addressData() const; - - void setRouteData(const NMVariantMapList &routeData); - NMVariantMapList routeData() const; - void fromMap(const QVariantMap &setting) override; QVariantMap toMap() const override; diff --git a/src/settings/ipv4setting_p.h b/src/settings/ipv4setting_p.h index ba0f9e9..30a36e0 100644 --- a/src/settings/ipv4setting_p.h +++ b/src/settings/ipv4setting_p.h @@ -49,13 +49,6 @@ public: QString dhcpHostname; bool neverDefault; bool mayFail; - qint32 dadTimeout; - QString dhcpFqdn; - QStringList dnsOptions; - qint32 dnsPriority; - QString gateway; - NMVariantMapList addressData; - NMVariantMapList routeData; }; } -- 2.16.4
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