Merge branch '0508' into 'yhkylin/v101'
fix bug 170162 168706 169896 See merge request kylinos-src/kylin-nm!168
This commit is contained in:
commit
cc9d4139c6
|
@ -463,6 +463,10 @@ void MobileHotspotWidget::getApInfo()
|
|||
setUiEnabled(false);
|
||||
m_uuid = apInfo.at(4);
|
||||
}
|
||||
int i = m_freqBandComboBox->findText(apInfo.at(5));
|
||||
if (i >= 0) {
|
||||
m_freqBandComboBox->setCurrentIndex(i);
|
||||
}
|
||||
} else {
|
||||
qDebug() << LOG_HEAD << "no such interface " << apInfo.at(2);
|
||||
}
|
||||
|
@ -801,6 +805,7 @@ void MobileHotspotWidget::setWidgetHidden(bool isHidden)
|
|||
|
||||
void MobileHotspotWidget::updateBandCombox()
|
||||
{
|
||||
QString tmp = m_freqBandComboBox->currentText();
|
||||
m_freqBandComboBox->clear();
|
||||
QDBusReply<QMap<QString, int> > capReply = m_interface->call("getWirelessDeviceCap");
|
||||
if (!capReply.isValid()) {
|
||||
|
@ -815,6 +820,10 @@ void MobileHotspotWidget::updateBandCombox()
|
|||
if (devCapMap[m_interfaceName] & 0x04) {
|
||||
m_freqBandComboBox->addItem("5GHz");
|
||||
}
|
||||
int index = m_freqBandComboBox->findText(tmp);
|
||||
if (index >= 0) {
|
||||
m_freqBandComboBox->setCurrentIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
QFrame* MobileHotspotWidget::myLine()
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include <NetworkManagerQt/VpnPlugin>
|
||||
#include <NetworkManagerQt/VpnSetting>
|
||||
|
||||
const QString str2GBand = "2.4Ghz";
|
||||
const QString str5GBand = "5Ghz";
|
||||
const QString str2GBand = "2.4GHz";
|
||||
const QString str5GBand = "5GHz";
|
||||
|
||||
static bool subLanListSort(const KyConnectItem* info1, const KyConnectItem* info2)
|
||||
{
|
||||
|
@ -736,9 +736,9 @@ KyApConnectItem *KyConnectResourse::getApConnectItem(NetworkManager::Connection:
|
|||
apConnectItem->m_connectSsid = getSsidFromByteArray(rawSsid);
|
||||
apConnectItem->m_connectUuid = connectPtr->uuid();
|
||||
if (wirelessSetting->band() == NetworkManager::WirelessSetting::FrequencyBand::A) {
|
||||
apConnectItem->m_band = str2GBand;
|
||||
} else if (wirelessSetting->band() == NetworkManager::WirelessSetting::FrequencyBand::Bg) {
|
||||
apConnectItem->m_band = str5GBand;
|
||||
} else if (wirelessSetting->band() == NetworkManager::WirelessSetting::FrequencyBand::Bg) {
|
||||
apConnectItem->m_band = str2GBand;
|
||||
}
|
||||
apConnectItem->m_ifaceName = settingPtr->interfaceName();
|
||||
apConnectItem->m_isActivated = m_networkResourceInstance->isActiveConnection(connectPtr->uuid());
|
||||
|
|
|
@ -33,14 +33,15 @@
|
|||
const QByteArray GSETTINGS_SCHEMA = "org.ukui.kylin-nm.switch";
|
||||
const QString WIRELESS_SWITCH = "wirelessswitch";
|
||||
|
||||
const QString WIFI_BAND_2_4GHZ = "2.4Ghz";
|
||||
const QString WIFI_BAND_5GHZ = "5Ghz";
|
||||
const QString WIFI_BAND_2_4GHZ = "2.4GHz";
|
||||
const QString WIFI_BAND_5GHZ = "5GHz";
|
||||
|
||||
enum KySecuType {
|
||||
NONE = 0,
|
||||
WPA_AND_WPA2_PERSONAL,
|
||||
WPA_AND_WPA2_ENTERPRISE,
|
||||
WPA3_PERSONAL,
|
||||
WPA_AND_WPA3,
|
||||
};
|
||||
|
||||
enum KyKeyMgmt {
|
||||
|
|
|
@ -189,7 +189,11 @@ void KyWirelessNetItem::setKySecuType(QString strSecuType)
|
|||
if (strSecuType.indexOf(ENTERPRICE_TYPE) >= 0) {
|
||||
m_kySecuType = WPA_AND_WPA2_ENTERPRISE;
|
||||
} else if (strSecuType.indexOf(WPA3) >= 0) {
|
||||
m_kySecuType = WPA3_PERSONAL;
|
||||
if ( strSecuType.indexOf(WPA1_AND_WPA2) >= 0) {
|
||||
m_kySecuType = WPA_AND_WPA3;
|
||||
} else {
|
||||
m_kySecuType = WPA3_PERSONAL;
|
||||
}
|
||||
} else if ( strSecuType.indexOf(WPA1_AND_WPA2) >= 0) {
|
||||
m_kySecuType = WPA_AND_WPA2_PERSONAL;
|
||||
} else {
|
||||
|
|
|
@ -536,7 +536,8 @@ void WlanListItem::onNetButtonClicked()
|
|||
//qDebug() << "!!!!" << m_wirelessNetItem.m_kySecuType << kySecuType;
|
||||
//有配置或者无密码的wifi直接连接
|
||||
if (m_wirelessNetItem.m_isConfigured) {
|
||||
if (m_wirelessNetItem.m_kySecuType == kySecuType) {
|
||||
if (m_wirelessNetItem.m_kySecuType == kySecuType ||
|
||||
(m_wirelessNetItem.m_kySecuType == WPA_AND_WPA3 && (kySecuType == WPA_AND_WPA2_PERSONAL || kySecuType == WPA3_PERSONAL))) {
|
||||
//安全类型不变直接连接
|
||||
m_wirelessConnectOperation->activeWirelessConnect(m_wlanDevice, m_wirelessNetItem.m_connectUuid);
|
||||
qDebug()<<"[WlanListItem] Has configuration, will be activated. ssid = "
|
||||
|
|
|
@ -373,6 +373,7 @@ void MainWindow::initDbusConnnect()
|
|||
connect(m_wlanWidget, &WlanPage::secuTypeChange, this, &MainWindow::secuTypeChange);
|
||||
connect(m_wlanWidget, &WlanPage::signalStrengthChange, this, &MainWindow::signalStrengthChange);
|
||||
connect(m_wlanWidget, &WlanPage::timeToUpdate , this, &MainWindow::timeToUpdate);
|
||||
connect(m_wlanWidget, &WlanPage::timeToUpdate , this, &MainWindow::onTimeUpdateTrayIcon);
|
||||
connect(m_wlanWidget, &WlanPage::showMainWindow, this, &MainWindow::onShowMainWindow);
|
||||
connect(m_wlanWidget, &WlanPage::connectivityChanged, this, &MainWindow::onConnectivityChanged);
|
||||
|
||||
|
@ -807,6 +808,19 @@ void MainWindow::onConnectivityChanged(NetworkManager::Connectivity connectivity
|
|||
onRefreshTrayIcon();
|
||||
}
|
||||
|
||||
void MainWindow::onTimeUpdateTrayIcon()
|
||||
{
|
||||
if (!m_trayIcon) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (iconStatus == ACTIVATING || (iconStatus != WLAN_CONNECTED && iconStatus != WLAN_CONNECTED_LIMITED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
onRefreshTrayIcon();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MainWindow::keyPressEvent 按esc键关闭主界面
|
||||
* @param event
|
||||
|
|
|
@ -215,6 +215,7 @@ private Q_SLOTS:
|
|||
void onLanConnectStatusToChangeTrayIcon(int state);
|
||||
void onWlanConnectStatusToChangeTrayIcon(int state);
|
||||
void onConnectivityChanged(NetworkManager::Connectivity connectivity);
|
||||
void onTimeUpdateTrayIcon();
|
||||
void onTabletModeChanged(bool mode);
|
||||
void onRefreshTrayIconTooltip();
|
||||
};
|
||||
|
|
|
@ -714,6 +714,7 @@ void NetDetail::initSecuData()
|
|||
break;
|
||||
case WPA_AND_WPA2_PERSONAL:
|
||||
case WPA3_PERSONAL:
|
||||
case WPA_AND_WPA3:
|
||||
if (!m_uuid.isEmpty()) {
|
||||
NetworkManager::Setting::SecretFlags flag;
|
||||
if (m_wirelessConnOpration->getConnSecretFlags(m_uuid, flag)) {
|
||||
|
|
Loading…
Reference in New Issue