mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Fix Wi-Fi interface bug when no networks are found
This commit is contained in:
parent
5838ff1833
commit
8ad06262e9
2 changed files with 5 additions and 4 deletions
|
@ -83,8 +83,7 @@ void toast::exitSlot(int exitCode) {
|
||||||
toast::close();
|
toast::close();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->messageLabel->setText("No networks found");
|
emit showToast("No networks found");
|
||||||
QTimer::singleShot(global::toast::delay, this, SLOT(close()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,12 +52,14 @@ void wifiDialog::checkWifiNetworks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void wifiDialog::printWifiNetworks() {
|
void wifiDialog::printWifiNetworks() {
|
||||||
string_checkconfig_ro("/run/wifi_networks_list");
|
if(readFile("/run/wifi_networks_list").isEmpty()) {
|
||||||
if(checkconfig_str_val == "") {
|
log("Wi-Fi networks list empty", className);
|
||||||
|
QFile::remove("/run/wifi_networks_list");
|
||||||
emit quit(1);
|
emit quit(1);
|
||||||
wifiDialog::close();
|
wifiDialog::close();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
log("Parsing Wi-Fi networks list", className);
|
||||||
QFile wifiNetworksListFile("/run/wifi_networks_list");
|
QFile wifiNetworksListFile("/run/wifi_networks_list");
|
||||||
wifiNetworksListFile.open(QIODevice::ReadWrite);
|
wifiNetworksListFile.open(QIODevice::ReadWrite);
|
||||||
QTextStream in (&wifiNetworksListFile);
|
QTextStream in (&wifiNetworksListFile);
|
||||||
|
|
Loading…
Reference in a new issue