Merge branch 'bug-195043' into 'yhkylin/v101'

fix(hotspot):无线网卡热点能力判断修改(#195043)

See merge request kylinos-src/kylin-nm!275
This commit is contained in:
赵世旭 2023-09-26 09:37:13 +00:00
commit d87f99ea9f
2 changed files with 5 additions and 1 deletions

View File

@ -453,7 +453,7 @@ int KyNetworkDeviceResourse::getWirelessDeviceCapability(const QString deviceNam
qobject_cast<NetworkManager::WirelessDevice *>(connectDevice.data()); qobject_cast<NetworkManager::WirelessDevice *>(connectDevice.data());
int cap = 0x00; int cap = 0x00;
if (wirelessDevicePtr->wirelessCapabilities() & NetworkManager::WirelessDevice::AdhocCap) { if (wirelessDevicePtr->wirelessCapabilities() & NetworkManager::WirelessDevice::ApCap) {
cap = cap | 0x02; cap = cap | 0x02;
} else { } else {
return 0x01; return 0x01;

View File

@ -295,6 +295,10 @@ QString KyWirelessNetResource::getDeviceIFace(NetworkManager::ActiveConnection::
NetworkManager::Device:: Ptr devicePtr = NetworkManager::Device:: Ptr devicePtr =
m_networkResourceInstance->findDeviceUni(ifaceUni); m_networkResourceInstance->findDeviceUni(ifaceUni);
if (devicePtr.isNull()) {
return QString();
}
return devicePtr->interfaceName(); return devicePtr->interfaceName();
} }