void WifiDialog::scanResults(WifiProfiles &aps) { proxy_.scanResults(aps); #ifdef _WINDOWS aps.clear(); for(int i = 0; i < 10; ++i) { WifiProfile a; a.setSsid(QString::number(i)); QByteArray d("aa:bb:cc:dd:ee:ff"); a.setBssid(d); aps.push_back(a); } #endif }
bool WifiConfig::load(QSqlDatabase& database, WifiProfiles & all) { QSqlQuery query(database); query.prepare( "select value from wifi_conf"); if (!query.exec()) { return false; } while (query.next()) { WifiProfile profile; QByteArray value = query.value(0).toByteArray(); profile.fromByteArray(value); all.push_back(profile); } return true; }