Commit 12ebc3fd authored by Jan Grulich's avatar Jan Grulich

Do not check NM version

parent bc4d82c1
......@@ -291,7 +291,6 @@ void Notification::stateChanged(NetworkManager::Device::State newstate, NetworkM
text = i18nc("@info:status Notification when the device failed due to SecondaryConnectionFailed",
"A secondary connection of the base connection failed");
break;
#if NM_CHECK_VERSION(0, 9, 10)
case NetworkManager::Device::DcbFcoeFailed:
text = i18nc("@info:status Notification when the device failed due to DcbFcoeFailed",
"DCB or FCoE setup failed");
......@@ -312,8 +311,6 @@ void Notification::stateChanged(NetworkManager::Device::State newstate, NetworkM
text = i18nc("@info:status Notification when the device failed due to SimPinIncorrect",
"The SIM PIN was incorrect");
break;
#endif
#if NM_CHECK_VERSION(1, 0, 4)
case NetworkManager::Device::NewActivation:
text = i18nc("@info:status Notification when the device failed due to NewActivation",
"A new connection activation was enqueued");
......@@ -326,7 +323,6 @@ void Notification::stateChanged(NetworkManager::Device::State newstate, NetworkM
text = i18nc("@info:status Notification when the device failed due to ParentManagedChanged",
"The device parent's management changed");
break;
#endif
case NetworkManager::Device::Reserved:
return;
}
......@@ -363,25 +359,13 @@ void Notification::addActiveConnection(const NetworkManager::ActiveConnection::P
if (ac->vpn()) {
NetworkManager::VpnConnection::Ptr vpnConnection = ac.objectCast<NetworkManager::VpnConnection>();
connect(vpnConnection.data(), &NetworkManager::VpnConnection::stateChanged, this, &Notification::onVpnConnectionStateChanged);
#if NM_CHECK_VERSION(0, 9, 10)
} else if (ac->type() != NetworkManager::ConnectionSettings::Bond &&
ac->type() != NetworkManager::ConnectionSettings::Bridge &&
ac->type() != NetworkManager::ConnectionSettings::Generic &&
ac->type() != NetworkManager::ConnectionSettings::Infiniband &&
ac->type() != NetworkManager::ConnectionSettings::Team &&
#if NM_CHECK_VERSION(1, 1, 92)
ac->type() != NetworkManager::ConnectionSettings::Vlan &&
ac->type() != NetworkManager::ConnectionSettings::Tun) {
#else
ac->type() != NetworkManager::ConnectionSettings::Vlan) {
#endif
#else
} else if (ac->type() != NetworkManager::ConnectionSettings::Bond &&
ac->type() != NetworkManager::ConnectionSettings::Bridge &&
ac->type() != NetworkManager::ConnectionSettings::Infiniband &&
ac->type() != NetworkManager::ConnectionSettings::Vlan) {
#endif
connect(ac.data(), &NetworkManager::ActiveConnection::stateChanged, this, &Notification::onActiveConnectionStateChanged);
}
}
......
......@@ -110,11 +110,7 @@ UiUtils::SortedConnectionType UiUtils::connectionTypeToSortedType(NetworkManager
bool UiUtils::isConnectionTypeSupported(NetworkManager::ConnectionSettings::ConnectionType type)
{
#if NM_CHECK_VERSION(1, 2, 0)
if (type == NetworkManager::ConnectionSettings::Generic || type == NetworkManager::ConnectionSettings::Tun) {
#else
if (type == NetworkManager::ConnectionSettings::Generic) {
#endif
return false;
}
......@@ -169,11 +165,9 @@ QString UiUtils::interfaceTypeLabel(const NetworkManager::Device::Type type, con
case NetworkManager::Device::Vlan:
deviceText = i18nc("title of the interface widget in nm's popup", "Virtual (vlan)");
break;
#if NM_CHECK_VERSION(0, 9, 10)
case NetworkManager::Device::Team:
deviceText = i18nc("title of the interface widget in nm's popup", "Virtual (team)");
break;
#endif
case NetworkManager::Device::Modem: {
const NetworkManager::ModemDevice::Ptr nmModemIface = iface.objectCast<NetworkManager::ModemDevice>();
if (nmModemIface) {
......@@ -250,11 +244,9 @@ QString UiUtils::iconAndTitleForConnectionSettingsType(NetworkManager::Connectio
text = i18n("Wi-Fi");
icon = QStringLiteral("network-wireless");
break;
#if NM_CHECK_VERSION(0, 9, 10)
case ConnectionSettings::Team:
text = i18n("Team");
break;
#endif
default:
text = i18n("Unknown connection type");
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment