Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions deepin-devicemanager/src/GenerateDevice/DeviceGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,21 +353,20 @@ void DeviceGenerator::generatorNetworkDevice()
continue;

const QString &logicalNameLshw = (*it)["logical name"];
for (QList<DeviceNetwork *>::iterator itDevice = lstDevice.begin(); itDevice != lstDevice.end(); ++itDevice) {
const QString &macAddressLshw = (*it)["serial"];
if (!isValidLogicalName(logicalNameLshw))
continue;
if (!isValidMAC(macAddressLshw))
continue;
if (logicalNameLshw.contains("wlan", Qt::CaseInsensitive) && hasWlan) //common sense: one PC only have 1 wlan device
continue;

const QString &macAddressLshw = (*it)["serial"];
if (!isValidLogicalName(logicalNameLshw))
continue;
if (!isValidMAC(macAddressLshw))
continue;
if (logicalNameLshw.contains("wlan", Qt::CaseInsensitive) && hasWlan) //common sense: one PC only have 1 wlan device
continue;

DeviceNetwork *device = new DeviceNetwork();
device->setInfoFromLshw(*it);
lstDevice.append(device);
if (logicalNameLshw.contains("wlan", Qt::CaseInsensitive))
hasWlan = true;
}
DeviceNetwork *device = new DeviceNetwork();
device->setInfoFromLshw(*it);
lstDevice.append(device);
if (logicalNameLshw.contains("wlan", Qt::CaseInsensitive))
hasWlan = true;
}

const QList<QMap<QString, QString>> &lstHWInfo = DeviceManager::instance()->cmdInfo("hwinfo_network");
Expand Down
Loading