Changeset View
Changeset View
Standalone View
Standalone View
libs/models/networkmodelitem.cpp
| Show First 20 Lines • Show All 321 Lines • ▼ Show 20 Line(s) | 321 | { | |||
|---|---|---|---|---|---|
| 322 | if (m_deviceName.isEmpty()) { | 322 | if (m_deviceName.isEmpty()) { | ||
| 323 | return m_name; | 323 | return m_name; | ||
| 324 | } | 324 | } | ||
| 325 | return m_name % QLatin1String(" (") % m_deviceName % ')'; | 325 | return m_name % QLatin1String(" (") % m_deviceName % ')'; | ||
| 326 | } | 326 | } | ||
| 327 | 327 | | |||
| 328 | QString NetworkModelItem::sectionType() const | 328 | QString NetworkModelItem::sectionType() const | ||
| 329 | { | 329 | { | ||
| 330 | if (m_connectionState == NetworkManager::ActiveConnection::Activated) { | 330 | if (m_connectionState == NetworkManager::ActiveConnection::Deactivated) { | ||
| 331 | return i18n("Active connections"); | 331 | return "Available connections"; | ||
| 332 | } else { | 332 | } else { | ||
| 333 | return i18n("Available connections"); | 333 | return QString(); | ||
| 334 | } | 334 | } | ||
| 335 | } | 335 | } | ||
| 336 | 336 | | |||
| 337 | NetworkManager::WirelessSecurityType NetworkModelItem::securityType() const | 337 | NetworkManager::WirelessSecurityType NetworkModelItem::securityType() const | ||
| 338 | { | 338 | { | ||
| 339 | return m_securityType; | 339 | return m_securityType; | ||
| 340 | } | 340 | } | ||
| 341 | 341 | | |||
| ▲ Show 20 Lines • Show All 238 Lines • ▼ Show 20 Line(s) | 576 | if (wiredDevice) { | |||
| 580 | m_details << i18n("MAC Address") << wiredDevice->permanentHardwareAddress(); | 580 | m_details << i18n("MAC Address") << wiredDevice->permanentHardwareAddress(); | ||
| 581 | } | 581 | } | ||
| 582 | } else if (m_type == NetworkManager::ConnectionSettings::Wireless) { | 582 | } else if (m_type == NetworkManager::ConnectionSettings::Wireless) { | ||
| 583 | NetworkManager::WirelessDevice::Ptr wirelessDevice = device.objectCast<NetworkManager::WirelessDevice>(); | 583 | NetworkManager::WirelessDevice::Ptr wirelessDevice = device.objectCast<NetworkManager::WirelessDevice>(); | ||
| 584 | m_details << i18n("Access point (SSID)") << m_ssid; | 584 | m_details << i18n("Access point (SSID)") << m_ssid; | ||
| 585 | if (m_mode == NetworkManager::WirelessSetting::Infrastructure) { | 585 | if (m_mode == NetworkManager::WirelessSetting::Infrastructure) { | ||
| 586 | m_details << i18n("Signal strength") << QStringLiteral("%1%").arg(m_signal); | 586 | m_details << i18n("Signal strength") << QStringLiteral("%1%").arg(m_signal); | ||
| 587 | } | 587 | } | ||
| 588 | if (m_connectionState == NetworkManager::ActiveConnection::Activated) { | | |||
| 589 | m_details << i18n("Security type") << UiUtils::labelFromWirelessSecurity(m_securityType); | 588 | m_details << i18n("Security type") << UiUtils::labelFromWirelessSecurity(m_securityType); | ||
| 590 | } | | |||
| 591 | if (wirelessDevice) { | 589 | if (wirelessDevice) { | ||
| 592 | if (m_connectionState == NetworkManager::ActiveConnection::Activated) { | 590 | if (m_connectionState == NetworkManager::ActiveConnection::Activated) { | ||
| 593 | m_details << i18n("Connection speed") << UiUtils::connectionSpeed(wirelessDevice->bitRate()); | 591 | m_details << i18n("Connection speed") << UiUtils::connectionSpeed(wirelessDevice->bitRate()); | ||
| 594 | } | 592 | } | ||
| 595 | m_details << i18n("MAC Address") << wirelessDevice->permanentHardwareAddress(); | 593 | m_details << i18n("MAC Address") << wirelessDevice->permanentHardwareAddress(); | ||
| 596 | } | 594 | } | ||
| 597 | } else if (m_type == NetworkManager::ConnectionSettings::Gsm || m_type == NetworkManager::ConnectionSettings::Cdma) { | 595 | } else if (m_type == NetworkManager::ConnectionSettings::Gsm || m_type == NetworkManager::ConnectionSettings::Cdma) { | ||
| 598 | #if WITH_MODEMMANAGER_SUPPORT | 596 | #if WITH_MODEMMANAGER_SUPPORT | ||
| ▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines | |||||