mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-06 18:45:46 +00:00
more correct checking dbus response
This commit is contained in:
@ -43,7 +43,7 @@ bool existingSessionOperation(const QString operation)
|
|||||||
QDBusMessage response = bus.call(request);
|
QDBusMessage response = bus.call(request);
|
||||||
QList<QVariant> arguments = response.arguments();
|
QList<QVariant> arguments = response.arguments();
|
||||||
|
|
||||||
return !arguments.isEmpty();
|
return (!arguments.isEmpty() && bool(arguments[0].toInt()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ bool MainWindow::isHelperActive()
|
|||||||
DBUS_HELPER_INTERFACE, QString("Active"),
|
DBUS_HELPER_INTERFACE, QString("Active"),
|
||||||
QList<QVariant>(), true, debug);
|
QList<QVariant>(), true, debug);
|
||||||
|
|
||||||
return (!responce.isEmpty());
|
return (!responce.isEmpty() && bool(responce[0].toInt()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ bool existingSessionOperation(const QString operation)
|
|||||||
QDBusMessage response = bus.call(request);
|
QDBusMessage response = bus.call(request);
|
||||||
QList<QVariant> arguments = response.arguments();
|
QList<QVariant> arguments = response.arguments();
|
||||||
|
|
||||||
return !arguments.isEmpty();
|
return (!arguments.isEmpty() && bool(arguments[0].toInt()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user