mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 07:37:21 -08:00
testPing fix
This commit is contained in:
parent
862ca379ef
commit
fe88cc43e9
2 changed files with 10 additions and 1 deletions
|
@ -794,12 +794,14 @@ namespace {
|
|||
}
|
||||
return exitCode;
|
||||
}
|
||||
/* For some reason, implementing a non-blocking version of this functions triggers a "terminate called without an active exception" error with a platform plugin compiled with a newer GCC 11 toolchain. The problem has been solved by transplanting this function into the related area which uses it.
|
||||
else {
|
||||
QString pingProg = "sh";
|
||||
QStringList pingArgs;
|
||||
pingArgs << "/mnt/onboard/.adds/inkbox/test_ping.sh";
|
||||
pingProcess->startDetached(pingProg, pingArgs);
|
||||
}
|
||||
*/
|
||||
pingProcess->deleteLater();
|
||||
}
|
||||
bool getTestPingResults() {
|
||||
|
|
|
@ -977,7 +977,14 @@ bool MainWindow::checkWifiState() {
|
|||
void MainWindow::setWifiIcon() {
|
||||
if(global::device::isWifiAble == true) {
|
||||
if(checkWifiState() == true) {
|
||||
testPing(false);
|
||||
// testPing() the non-blocking way
|
||||
QProcess * pingProcess = new QProcess();
|
||||
QString pingProg = "sh";
|
||||
QStringList pingArgs;
|
||||
pingArgs << "/mnt/onboard/.adds/inkbox/test_ping.sh";
|
||||
pingProcess->startDetached(pingProg, pingArgs);
|
||||
pingProcess->deleteLater();
|
||||
|
||||
getTestPingResults();
|
||||
if(global::network::isConnected == true) {
|
||||
if(lastWifiState != 3) {
|
||||
|
|
Loading…
Reference in a new issue