mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 07:37:21 -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();
|
||||
}
|
||||
else {
|
||||
ui->messageLabel->setText("No networks found");
|
||||
QTimer::singleShot(global::toast::delay, this, SLOT(close()));
|
||||
emit showToast("No networks found");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,12 +52,14 @@ void wifiDialog::checkWifiNetworks() {
|
|||
}
|
||||
|
||||
void wifiDialog::printWifiNetworks() {
|
||||
string_checkconfig_ro("/run/wifi_networks_list");
|
||||
if(checkconfig_str_val == "") {
|
||||
if(readFile("/run/wifi_networks_list").isEmpty()) {
|
||||
log("Wi-Fi networks list empty", className);
|
||||
QFile::remove("/run/wifi_networks_list");
|
||||
emit quit(1);
|
||||
wifiDialog::close();
|
||||
}
|
||||
else {
|
||||
log("Parsing Wi-Fi networks list", className);
|
||||
QFile wifiNetworksListFile("/run/wifi_networks_list");
|
||||
wifiNetworksListFile.open(QIODevice::ReadWrite);
|
||||
QTextStream in (&wifiNetworksListFile);
|
||||
|
|
Loading…
Reference in a new issue