Decrease some indentation in linux platform code
This commit is contained in:
parent
4348ddf938
commit
bad888496c
|
@ -420,10 +420,17 @@ bool IsSNIAvailable() {
|
||||||
|
|
||||||
if (reply.isValid()) {
|
if (reply.isValid()) {
|
||||||
return reply.value().toBool();
|
return reply.value().toBool();
|
||||||
} else if (reply.error().type() != QDBusError::ServiceUnknown) {
|
|
||||||
LOG(("SNI Error: %1").arg(reply.error().message()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (reply.error().type()) {
|
||||||
|
case QDBusError::Disconnected:
|
||||||
|
case QDBusError::ServiceUnknown:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG(("SNI Error: %1").arg(reply.error().message()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ QStringList ListDBusActivatableNames() {
|
||||||
|
|
||||||
if (reply.isValid()) {
|
if (reply.isValid()) {
|
||||||
return reply.value();
|
return reply.value();
|
||||||
} else {
|
} else if (reply.error().type() != QDBusError::Disconnected) {
|
||||||
LOG(("App Error: %1: %2")
|
LOG(("App Error: %1: %2")
|
||||||
.arg(reply.error().name())
|
.arg(reply.error().name())
|
||||||
.arg(reply.error().message()));
|
.arg(reply.error().message()));
|
||||||
|
@ -155,13 +155,12 @@ void PortalAutostart(bool autostart, bool silent = false) {
|
||||||
|
|
||||||
if (silent) {
|
if (silent) {
|
||||||
QDBusConnection::sessionBus().send(message);
|
QDBusConnection::sessionBus().send(message);
|
||||||
} else {
|
return;
|
||||||
const QDBusReply<void> reply = QDBusConnection::sessionBus().call(
|
}
|
||||||
message);
|
|
||||||
|
|
||||||
if (!reply.isValid()) {
|
const QDBusError error = QDBusConnection::sessionBus().call(message);
|
||||||
LOG(("Flatpak autostart error: %1").arg(reply.error().message()));
|
if (error.isValid()) {
|
||||||
}
|
LOG(("Flatpak autostart error: %1").arg(error.message()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,11 +216,11 @@ uint FileChooserPortalVersion() {
|
||||||
|
|
||||||
if (reply.isValid()) {
|
if (reply.isValid()) {
|
||||||
return reply.value().toUInt();
|
return reply.value().toUInt();
|
||||||
} else {
|
|
||||||
LOG(("Error getting FileChooser portal version: %1")
|
|
||||||
.arg(reply.error().message()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG(("Error getting FileChooser portal version: %1")
|
||||||
|
.arg(reply.error().message()));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue