cleanup
This commit is contained in:
@@ -38,7 +38,6 @@ QList<Network> NetworkScanner::scanForNetworks()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const std::string &ssid : ssids) {
|
for (const std::string &ssid : ssids) {
|
||||||
std::cout << ssid << std::endl;
|
|
||||||
Network newNetwork = Network(ssid.c_str());
|
Network newNetwork = Network(ssid.c_str());
|
||||||
networks.append(newNetwork);
|
networks.append(newNetwork);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ QVariant NetworksModel::data(const QModelIndex &index, int role) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Network& network = this->m_networks.at(index.row());
|
const Network& network = this->m_networks.at(index.row());
|
||||||
qDebug() << "role: " << role << " vs. " << NameRole;
|
|
||||||
qDebug() << "network: " << network.name();
|
|
||||||
if (role == NameRole)
|
if (role == NameRole)
|
||||||
{
|
{
|
||||||
return network.name();
|
return network.name();
|
||||||
@@ -39,14 +37,8 @@ void NetworksModel::scan()
|
|||||||
beginResetModel();
|
beginResetModel();
|
||||||
|
|
||||||
QList<Network> networks = this->m_networkScanner.scanForNetworks();
|
QList<Network> networks = this->m_networkScanner.scanForNetworks();
|
||||||
for (const Network& network: networks)
|
|
||||||
{
|
|
||||||
qDebug() << "Got network: " << network.name() << Qt::endl;
|
|
||||||
}
|
|
||||||
this->m_networks = networks;
|
this->m_networks = networks;
|
||||||
|
|
||||||
qDebug() << "now have " << this->m_networks.size() << Qt::endl;
|
|
||||||
|
|
||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user