Merge branch '0904' into 'yhkylin/v101'
fix(hotspot):fix error when a wirless device do not support Adhoc(#190431) See merge request kylinos-src/kylin-nm!255
This commit is contained in:
commit
53dabb2d8d
|
@ -416,7 +416,7 @@ void MobileHotspotWidget::initInterfaceInfo()
|
|||
QMap<QString, bool>::Iterator iter = devMap.begin();
|
||||
while (iter != devMap.end()) {
|
||||
QString interfaceName = iter.key();
|
||||
if (devCapMap[interfaceName] & 0x01) {
|
||||
if (!(devCapMap[interfaceName] & 0x01)) {
|
||||
m_interfaceComboBox->addItem(interfaceName);
|
||||
}
|
||||
iter++;
|
||||
|
|
|
@ -452,11 +452,12 @@ int KyNetworkDeviceResourse::getWirelessDeviceCapability(const QString deviceNam
|
|||
NetworkManager::WirelessDevice *wirelessDevicePtr =
|
||||
qobject_cast<NetworkManager::WirelessDevice *>(connectDevice.data());
|
||||
|
||||
int cap = 0x01;
|
||||
if (!wirelessDevicePtr->wirelessCapabilities() & NetworkManager::WirelessDevice::AdhocCap) {
|
||||
return cap;
|
||||
int cap = 0x00;
|
||||
if (wirelessDevicePtr->wirelessCapabilities() & NetworkManager::WirelessDevice::AdhocCap) {
|
||||
cap = cap | 0x02;
|
||||
} else {
|
||||
return 0x01;
|
||||
}
|
||||
cap = cap | 0x02;
|
||||
QDBusInterface dbusInterface("org.freedesktop.NetworkManager",
|
||||
connectDevice->uni(),
|
||||
"org.freedesktop.NetworkManager.Device.Wireless",
|
||||
|
|
Loading…
Reference in New Issue