mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-23 01:27:15 +02:00
Decrease some indentation in linux platform code
This commit is contained in:
parent
4348ddf938
commit
bad888496c
2 changed files with 18 additions and 12 deletions
|
@ -420,10 +420,17 @@ bool IsSNIAvailable() {
|
|||
|
||||
if (reply.isValid()) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ QStringList ListDBusActivatableNames() {
|
|||
|
||||
if (reply.isValid()) {
|
||||
return reply.value();
|
||||
} else {
|
||||
} else if (reply.error().type() != QDBusError::Disconnected) {
|
||||
LOG(("App Error: %1: %2")
|
||||
.arg(reply.error().name())
|
||||
.arg(reply.error().message()));
|
||||
|
@ -155,13 +155,12 @@ void PortalAutostart(bool autostart, bool silent = false) {
|
|||
|
||||
if (silent) {
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
} else {
|
||||
const QDBusReply<void> reply = QDBusConnection::sessionBus().call(
|
||||
message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!reply.isValid()) {
|
||||
LOG(("Flatpak autostart error: %1").arg(reply.error().message()));
|
||||
}
|
||||
const QDBusError error = QDBusConnection::sessionBus().call(message);
|
||||
if (error.isValid()) {
|
||||
LOG(("Flatpak autostart error: %1").arg(error.message()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,11 +216,11 @@ uint FileChooserPortalVersion() {
|
|||
|
||||
if (reply.isValid()) {
|
||||
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;
|
||||
}();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue