mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07: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;
|
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 {
|
else {
|
||||||
QString pingProg = "sh";
|
QString pingProg = "sh";
|
||||||
QStringList pingArgs;
|
QStringList pingArgs;
|
||||||
pingArgs << "/mnt/onboard/.adds/inkbox/test_ping.sh";
|
pingArgs << "/mnt/onboard/.adds/inkbox/test_ping.sh";
|
||||||
pingProcess->startDetached(pingProg, pingArgs);
|
pingProcess->startDetached(pingProg, pingArgs);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
pingProcess->deleteLater();
|
pingProcess->deleteLater();
|
||||||
}
|
}
|
||||||
bool getTestPingResults() {
|
bool getTestPingResults() {
|
||||||
|
|
|
@ -977,7 +977,14 @@ bool MainWindow::checkWifiState() {
|
||||||
void MainWindow::setWifiIcon() {
|
void MainWindow::setWifiIcon() {
|
||||||
if(global::device::isWifiAble == true) {
|
if(global::device::isWifiAble == true) {
|
||||||
if(checkWifiState() == 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();
|
getTestPingResults();
|
||||||
if(global::network::isConnected == true) {
|
if(global::network::isConnected == true) {
|
||||||
if(lastWifiState != 3) {
|
if(lastWifiState != 3) {
|
||||||
|
|
Loading…
Reference in a new issue