Commit 559693ce authored by Jan Grulich's avatar Jan Grulich

Completely remove WiMAX support

It has been removed and deprecate in NetworkManager some time ago so
there is no point keeping the code in plasma-nm
parent 845f9024
......@@ -36,8 +36,7 @@ PlasmaComponents.ListItem {
(SecurityType == PlasmaNM.Enums.StaticWep || SecurityType == PlasmaNM.Enums.WpaPsk ||
SecurityType == PlasmaNM.Enums.Wpa2Psk)
property bool showSpeed: ConnectionState == PlasmaNM.Enums.Activated &&
(Type == PlasmaNM.Enums.Wimax ||
Type == PlasmaNM.Enums.Wired ||
(Type == PlasmaNM.Enums.Wired ||
Type == PlasmaNM.Enums.Wireless ||
Type == PlasmaNM.Enums.Gsm ||
Type == PlasmaNM.Enums.Cdma)
......
......@@ -26,9 +26,6 @@ AvailableDevices::AvailableDevices(QObject* parent)
: QObject(parent)
, m_wiredDeviceAvailable(false)
, m_wirelessDeviceAvailable(false)
#if !NM_CHECK_VERSION(1, 2, 0)
, m_wimaxDeviceAvailable(false)
#endif
, m_modemDeviceAvailable(false)
, m_bluetoothDeviceAvailable(false)
{
......@@ -37,10 +34,6 @@ AvailableDevices::AvailableDevices(QObject* parent)
m_modemDeviceAvailable = true;
} else if (device->type() == NetworkManager::Device::Wifi) {
m_wirelessDeviceAvailable = true;
#if !NM_CHECK_VERSION(1, 2, 0)
} else if (device->type() == NetworkManager::Device::Wimax) {
m_wimaxDeviceAvailable = true;
#endif
} else if (device->type() == NetworkManager::Device::Ethernet) {
m_wiredDeviceAvailable = true;
} else if (device->type() == NetworkManager::Device::Bluetooth) {
......@@ -66,13 +59,6 @@ bool AvailableDevices::isWirelessDeviceAvailable() const
return m_wirelessDeviceAvailable;
}
#if !NM_CHECK_VERSION(1, 2, 0)
bool AvailableDevices::isWimaxDeviceAvailable() const
{
return m_wimaxDeviceAvailable;
}
#endif
bool AvailableDevices::isModemDeviceAvailable() const
{
return m_modemDeviceAvailable;
......@@ -94,11 +80,6 @@ void AvailableDevices::deviceAdded(const QString& dev)
} else if (device->type() == NetworkManager::Device::Wifi && !m_wirelessDeviceAvailable) {
m_wirelessDeviceAvailable = true;
Q_EMIT wirelessDeviceAvailableChanged(true);
#if !NM_CHECK_VERSION(1, 2, 0)
} else if (device->type() == NetworkManager::Device::Wimax && !m_wimaxDeviceAvailable) {
m_wimaxDeviceAvailable = true;
Q_EMIT wimaxDeviceAvailableChanged(true);
#endif
} else if (device->type() == NetworkManager::Device::Ethernet && !m_wiredDeviceAvailable) {
m_wiredDeviceAvailable = true;
Q_EMIT wiredDeviceAvailableChanged(true);
......@@ -113,9 +94,6 @@ void AvailableDevices::deviceRemoved()
{
bool wired = false;
bool wireless = false;
#if !NM_CHECK_VERSION(1, 2, 0)
bool wimax = false;
#endif
bool modem = false;
bool bluetooth = false;
......@@ -124,10 +102,6 @@ void AvailableDevices::deviceRemoved()
modem = true;
} else if (device->type() == NetworkManager::Device::Wifi) {
wireless = true;
#if !NM_CHECK_VERSION(1, 2, 0)
} else if (device->type() == NetworkManager::Device::Wimax) {
wimax = true;
#endif
} else if (device->type() == NetworkManager::Device::Ethernet) {
wired = true;
} else if (device->type() == NetworkManager::Device::Bluetooth) {
......@@ -145,13 +119,6 @@ void AvailableDevices::deviceRemoved()
Q_EMIT wirelessDeviceAvailableChanged(false);
}
#if !NM_CHECK_VERSION(1, 2, 0)
if (!wimax && m_wimaxDeviceAvailable) {
m_wimaxDeviceAvailable = false;
Q_EMIT wimaxDeviceAvailableChanged(false);
}
#endif
if (!modem && m_modemDeviceAvailable) {
m_modemDeviceAvailable = false;
Q_EMIT modemDeviceAvailableChanged(false);
......
......@@ -36,13 +36,6 @@ Q_PROPERTY(bool wiredDeviceAvailable READ isWiredDeviceAvailable NOTIFY wiredDev
*/
Q_PROPERTY(bool wirelessDeviceAvailable READ isWirelessDeviceAvailable NOTIFY wirelessDeviceAvailableChanged)
#if !NM_CHECK_VERSION(1, 2, 0)
/**
* Return true when there is present wimax device
*/
Q_PROPERTY(bool wimaxDeviceAvailable READ isWimaxDeviceAvailable NOTIFY wimaxDeviceAvailableChanged)
#endif
/**
* Return true when there is present modem device
*/
......@@ -60,9 +53,6 @@ public:
public Q_SLOTS:
bool isWiredDeviceAvailable() const;
bool isWirelessDeviceAvailable() const;
#if !NM_CHECK_VERSION(1, 2, 0)
bool isWimaxDeviceAvailable() const;
#endif
bool isModemDeviceAvailable() const;
bool isBluetoothDeviceAvailable() const;
......@@ -73,18 +63,12 @@ private Q_SLOTS:
Q_SIGNALS:
void wiredDeviceAvailableChanged(bool available);
void wirelessDeviceAvailableChanged(bool available);
#if !NM_CHECK_VERSION(1, 2, 0)
void wimaxDeviceAvailableChanged(bool available);
#endif
void modemDeviceAvailableChanged(bool available);
void bluetoothDeviceAvailableChanged(bool available);
private:
bool m_wiredDeviceAvailable;
bool m_wirelessDeviceAvailable;
#if !NM_CHECK_VERSION(1, 2, 0)
bool m_wimaxDeviceAvailable;
#endif
bool m_modemDeviceAvailable;
bool m_bluetoothDeviceAvailable;
};
......
......@@ -26,20 +26,12 @@ EnabledConnections::EnabledConnections(QObject* parent)
, m_networkingEnabled(NetworkManager::isNetworkingEnabled())
, m_wirelessEnabled(NetworkManager::isWirelessEnabled())
, m_wirelessHwEnabled(NetworkManager::isWirelessHardwareEnabled())
#if !NM_CHECK_VERSION(1, 2, 0)
, m_wimaxEnabled(NetworkManager::isWimaxEnabled())
, m_wimaxHwEnabled(NetworkManager::isWimaxHardwareEnabled())
#endif
, m_wwanEnabled(NetworkManager::isWwanEnabled())
, m_wwanHwEnabled(NetworkManager::isWwanHardwareEnabled())
{
connect(NetworkManager::notifier(), &NetworkManager::Notifier::networkingEnabledChanged, this, &EnabledConnections::onNetworkingEnabled);
connect(NetworkManager::notifier(), &NetworkManager::Notifier::wirelessEnabledChanged, this, &EnabledConnections::onWirelessEnabled);
connect(NetworkManager::notifier(), &NetworkManager::Notifier::wirelessHardwareEnabledChanged, this, &EnabledConnections::onWirelessHwEnabled);
#if !NM_CHECK_VERSION(1, 2, 0)
connect(NetworkManager::notifier(), &NetworkManager::Notifier::wimaxEnabledChanged, this, &EnabledConnections::onWimaxEnabled);
connect(NetworkManager::notifier(), &NetworkManager::Notifier::wimaxHardwareEnabledChanged, this, &EnabledConnections::onWimaxHwEnabled);
#endif
connect(NetworkManager::notifier(), &NetworkManager::Notifier::wwanEnabledChanged, this, &EnabledConnections::onWwanEnabled);
connect(NetworkManager::notifier(), &NetworkManager::Notifier::wwanHardwareEnabledChanged, this, &EnabledConnections::onWwanHwEnabled);
}
......@@ -63,18 +55,6 @@ bool EnabledConnections::isWirelessHwEnabled() const
return m_wirelessHwEnabled;
}
#if !NM_CHECK_VERSION(1, 2, 0)
bool EnabledConnections::isWimaxEnabled() const
{
return m_wimaxEnabled;
}
bool EnabledConnections::isWimaxHwEnabled() const
{
return m_wimaxHwEnabled;
}
#endif
bool EnabledConnections::isWwanEnabled() const
{
return m_wwanEnabled;
......@@ -103,20 +83,6 @@ void EnabledConnections::onWirelessHwEnabled(bool enabled)
Q_EMIT wirelessHwEnabled(enabled);
}
#if !NM_CHECK_VERSION(1, 2, 0)
void EnabledConnections::onWimaxEnabled(bool enabled)
{
m_wimaxEnabled = enabled;
Q_EMIT wimaxEnabled(enabled);
}
void EnabledConnections::onWimaxHwEnabled(bool enabled)
{
m_wimaxHwEnabled = enabled;
Q_EMIT wimaxHwEnabled(enabled);
}
#endif
void EnabledConnections::onWwanEnabled(bool enabled)
{
m_wwanEnabled = enabled;
......
......@@ -39,18 +39,6 @@ Q_PROPERTY(bool wirelessEnabled READ isWirelessEnabled NOTIFY wirelessEnabled)
* Indicates if the wireless hardware is currently enabled, i.e. the state of the RF kill switch
*/
Q_PROPERTY(bool wirelessHwEnabled READ isWirelessHwEnabled NOTIFY wirelessHwEnabled)
#if !NM_CHECK_VERSION(1, 2, 0)
/**
* Indicates if WiMAX devices are currently enabled or not
*/
Q_PROPERTY(bool wimaxEnabled READ isWimaxEnabled NOTIFY wimaxEnabled)
/**
* Indicates if the WiMAX hardware is currently enabled, i.e. the state of the RF kill switch.
*/
Q_PROPERTY(bool wimaxHwEnabled READ isWimaxHwEnabled NOTIFY wimaxHwEnabled)
#endif
/**
* Indicates if mobile broadband devices are currently enabled or not.
*/
......@@ -67,10 +55,6 @@ public:
bool isNetworkingEnabled() const;
bool isWirelessEnabled() const;
bool isWirelessHwEnabled() const;
#if !NM_CHECK_VERSION(1, 2, 0)
bool isWimaxEnabled() const;
bool isWimaxHwEnabled() const;
#endif
bool isWwanEnabled() const;
bool isWwanHwEnabled() const;
......@@ -78,10 +62,6 @@ public Q_SLOTS:
void onNetworkingEnabled(bool enabled);
void onWirelessEnabled(bool enabled);
void onWirelessHwEnabled(bool enabled);
#if !NM_CHECK_VERSION(1, 2, 0)
void onWimaxEnabled(bool enabled);
void onWimaxHwEnabled(bool enabled);
#endif
void onWwanEnabled(bool enabled);
void onWwanHwEnabled(bool enabled);
......@@ -89,10 +69,6 @@ Q_SIGNALS:
void networkingEnabled(bool enabled);
void wirelessEnabled(bool enabled);
void wirelessHwEnabled(bool enabled);
#if !NM_CHECK_VERSION(1, 2, 0)
void wimaxEnabled(bool enabled);
void wimaxHwEnabled(bool enabled);
#endif
void wwanEnabled(bool enabled);
void wwanHwEnabled(bool enabled);
......@@ -100,10 +76,6 @@ private:
bool m_networkingEnabled;
bool m_wirelessEnabled;
bool m_wirelessHwEnabled;
#if !NM_CHECK_VERSION(1, 2, 0)
bool m_wimaxEnabled;
bool m_wimaxHwEnabled;
#endif
bool m_wwanEnabled;
bool m_wwanHwEnabled;
};
......
......@@ -55,7 +55,6 @@ public:
Pppoe,
Vlan,
Vpn,
Wimax,
Wired,
Wireless
};
......
......@@ -55,9 +55,6 @@ NetworkStatus::SortedConnectionType NetworkStatus::connectionTypeToSortedType(Ne
case NetworkManager::ConnectionSettings::Vpn:
return NetworkStatus::Vpn;
break;
case NetworkManager::ConnectionSettings::Wimax:
return NetworkStatus::Wimax;
break;
case NetworkManager::ConnectionSettings::Wired:
return NetworkStatus::Wired;
break;
......
......@@ -40,7 +40,6 @@ public:
enum SortedConnectionType {
Wired,
Wireless,
Wimax,
Gsm,
Cdma,
Pppoe,
......
......@@ -17,7 +17,6 @@ set(plasmanm_editor_SRCS
settings/vlanwidget.cpp
settings/wificonnectionwidget.cpp
settings/wifisecurity.cpp
settings/wimaxwidget.cpp
settings/wiredconnectionwidget.cpp
settings/wiredsecurity.cpp
......@@ -73,7 +72,6 @@ ki18n_wrap_ui(plasmanm_editor_SRCS
settings/ui/team.ui
settings/ui/wificonnectionwidget.ui
settings/ui/wifisecurity.ui
settings/ui/wimax.ui
settings/ui/wiredconnectionwidget.ui
settings/ui/wiredsecurity.ui
......
......@@ -39,7 +39,6 @@
#include "settings/wifisecurity.h"
#include "settings/wiredconnectionwidget.h"
#include "settings/wiredsecurity.h"
#include "settings/wimaxwidget.h"
#include "vpnuiplugin.h"
#include <NetworkManagerQt/ActiveConnection>
......@@ -279,7 +278,6 @@ void ConnectionEditorBase::initialize()
if ((type == NetworkManager::ConnectionSettings::Wired
|| type == NetworkManager::ConnectionSettings::Wireless
|| type == NetworkManager::ConnectionSettings::Infiniband
|| type == NetworkManager::ConnectionSettings::Wimax
#if NM_CHECK_VERSION(0, 9, 10)
|| type == NetworkManager::ConnectionSettings::Team
#endif
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author>Lukáš Tinkl &lt;ltinkl@redhat.com&gt;</author>
<class>WimaxWidget</class>
<widget class="QWidget" name="WimaxWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>369</width>
<height>70</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Network name:</string>
</property>
<property name="buddy">
<cstring>networkName</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KLineEdit" name="networkName"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Restrict to device:</string>
</property>
<property name="buddy">
<cstring>macAddress</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="HwAddrComboBox" name="macAddress">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>HwAddrComboBox</class>
<extends>QComboBox</extends>
<header>hwaddrcombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>networkName</tabstop>
<tabstop>macAddress</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
/*
Copyright 2013 Lukas Tinkl <ltinkl@redhat.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
successor approved by the membership of KDE e.V.), which shall
act as a proxy defined in Section 6 of version 3 of the license.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wimaxwidget.h"
#include "ui_wimax.h"
#include "uiutils.h"
#include <NetworkManagerQt/Utils>
#include <NetworkManagerQt/WimaxSetting>
#include <KLocalizedString>
WimaxWidget::WimaxWidget(const NetworkManager::Setting::Ptr &setting, QWidget* parent, Qt::WindowFlags f):
SettingWidget(setting, parent, f),
m_ui(new Ui::WimaxWidget)
{
m_ui->setupUi(this);
connect(m_ui->networkName, &KLineEdit::textChanged, this, &WimaxWidget::slotWidgetChanged);
connect(m_ui->macAddress, &HwAddrComboBox::hwAddressChanged, this, &WimaxWidget::slotWidgetChanged);
// Connect for setting check
watchChangedSetting();
KAcceleratorManager::manage(this);
if (setting) {
loadConfig(setting);
}
}
WimaxWidget::~WimaxWidget()
{
delete m_ui;
}
void WimaxWidget::loadConfig(const NetworkManager::Setting::Ptr &setting)
{
NetworkManager::WimaxSetting::Ptr wimaxSetting = setting.staticCast<NetworkManager::WimaxSetting>();
m_ui->networkName->setText(wimaxSetting->networkName());
m_ui->macAddress->init(NetworkManager::Device::Wimax, NetworkManager::macAddressAsString(wimaxSetting->macAddress()));
}
QVariantMap WimaxWidget::setting() const
{
NetworkManager::WimaxSetting wimaxSetting;
wimaxSetting.setNetworkName(m_ui->networkName->text());
wimaxSetting.setMacAddress(NetworkManager::macAddressFromString(m_ui->macAddress->hwAddress()));
return wimaxSetting.toMap();
}
bool WimaxWidget::isValid() const
{
return !m_ui->networkName->text().isEmpty() && m_ui->macAddress->isValid();
}
/*
Copyright 2013 Lukas Tinkl <ltinkl@redhat.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
successor approved by the membership of KDE e.V.), which shall
act as a proxy defined in Section 6 of version 3 of the license.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PLASMA_NM_WIMAX_WIDGET_H
#define PLASMA_NM_WIMAX_WIDGET_H
#include <QWidget>
#include "settingwidget.h"
namespace Ui
{
class WimaxWidget;
}
class Q_DECL_EXPORT WimaxWidget : public SettingWidget
{
Q_OBJECT
public:
explicit WimaxWidget(const NetworkManager::Setting::Ptr &setting = NetworkManager::Setting::Ptr(), QWidget* parent = 0, Qt::WindowFlags f = 0);
virtual ~WimaxWidget();
void loadConfig(const NetworkManager::Setting::Ptr &setting) Q_DECL_OVERRIDE;
QVariantMap setting() const Q_DECL_OVERRIDE;
virtual bool isValid() const Q_DECL_OVERRIDE;
private:
Ui::WimaxWidget * m_ui;
};
#endif // PLASMA_NM_WIMAX_WIDGET_H
......@@ -25,9 +25,6 @@
#include <NetworkManagerQt/WirelessDevice>
#include <NetworkManagerQt/BluetoothDevice>
#include <NetworkManagerQt/OlpcMeshDevice>
#if !NM_CHECK_VERSION(1, 2, 0)
#include <NetworkManagerQt/WimaxDevice>
#endif
#include <NetworkManagerQt/InfinibandDevice>
#include <NetworkManagerQt/BondDevice>
#include <NetworkManagerQt/BridgeDevice>
......@@ -150,10 +147,6 @@ QVariant HwAddrComboBox::hwAddressFromDevice(const NetworkManager::Device::Ptr&
data = device->as<NetworkManager::BluetoothDevice>()->hardwareAddress();
} else if (type == NetworkManager::Device::OlpcMesh) {
data = device->as<NetworkManager::OlpcMeshDevice>()->hardwareAddress();
#if !NM_CHECK_VERSION(1, 2, 0)
} else if (type == NetworkManager::Device::Wimax) {
data = device->as<NetworkManager::WimaxDevice>()->hardwareAddress();
#endif
} else if (type == NetworkManager::Device::InfiniBand) {
data = device->as<NetworkManager::InfinibandDevice>()->hwAddress();
} else if (type == NetworkManager::Device::Bond) {
......
......@@ -62,9 +62,6 @@
Handler::Handler(QObject *parent)
: QObject(parent)
#if !NM_CHECK_VERSION(1, 2, 0)
, m_tmpWimaxEnabled(NetworkManager::isWimaxEnabled())
#endif
, m_tmpWirelessEnabled(NetworkManager::isWirelessEnabled())
, m_tmpWwanEnabled(NetworkManager::isWwanEnabled())
{
......@@ -287,24 +284,13 @@ void Handler::disconnectAll()
void Handler::enableAirplaneMode(bool enable)
{
if (enable) {
#if !NM_CHECK_VERSION(1, 2, 0)
m_tmpWimaxEnabled = NetworkManager::isWimaxEnabled();
#endif
m_tmpWirelessEnabled = NetworkManager::isWirelessEnabled();
m_tmpWwanEnabled = NetworkManager::isWwanEnabled();
enableBluetooth(false);
#if !NM_CHECK_VERSION(1, 2, 0)
enableWimax(false);
#endif
enableWireless(false);
enableWwan(false);
} else {
enableBluetooth(true);
#if !NM_CHECK_VERSION(1, 2, 0)
if (m_tmpWimaxEnabled) {
enableWimax(true);
}
#endif
if (m_tmpWirelessEnabled) {
enableWireless(true);
}
......@@ -382,13 +368,6 @@ void Handler::enableWireless(bool enable)
NetworkManager::setWirelessEnabled(enable);
}
#if !NM_CHECK_VERSION(1, 2, 0)
void Handler::enableWimax(bool enable)
{
NetworkManager::setWimaxEnabled(enable);
}
#endif
void Handler::enableWwan(bool enable)
{
NetworkManager::setWwanEnabled(enable);
......
......@@ -86,9 +86,6 @@ public Q_SLOTS:
void enableAirplaneMode(bool enable);
void enableNetworking(bool enable);
void enableWireless(bool enable);
#if !NM_CHECK_VERSION(1, 2, 0)
void enableWimax(bool enable);
#endif
void enableWwan(bool enable);
/**
......@@ -112,9 +109,6 @@ private Q_SLOTS:
#endif
private:
#if !NM_CHECK_VERSION(1, 2, 0)
bool m_tmpWimaxEnabled;
#endif
bool m_tmpWirelessEnabled;
bool m_tmpWwanEnabled;
#if WITH_MODEMMANAGER_SUPPORT
......
......@@ -51,8 +51,7 @@ bool AppletProxyModel::filterAcceptsRow(int source_row, const QModelIndex& sourc
NetworkModelItem::ItemType itemType = (NetworkModelItem::ItemType)sourceModel()->data(index, NetworkModel::ItemTypeRole).toUInt();
if (itemType == NetworkModelItem::AvailableConnection ||
itemType == NetworkModelItem::AvailableAccessPoint ||
itemType == NetworkModelItem::AvailableNsp) {
itemType == NetworkModelItem::AvailableAccessPoint) {
return true;
}
......