mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-06 17:35:36 +00:00
Make not supported errors static
This commit is contained in:
@@ -148,14 +148,14 @@ bool Inhibited() {
|
||||
const QDBusReply<QVariant> reply = QDBusConnection::sessionBus().call(
|
||||
message);
|
||||
|
||||
const auto notSupportedErrors = {
|
||||
static const auto NotSupportedErrors = {
|
||||
QDBusError::ServiceUnknown,
|
||||
QDBusError::InvalidArgs,
|
||||
};
|
||||
|
||||
if (reply.isValid()) {
|
||||
return reply.value().toBool();
|
||||
} else if (ranges::contains(notSupportedErrors, reply.error().type())) {
|
||||
} else if (ranges::contains(NotSupportedErrors, reply.error().type())) {
|
||||
InhibitedNotSupported = true;
|
||||
} else {
|
||||
if (reply.error().type() == QDBusError::AccessDenied) {
|
||||
|
Reference in New Issue
Block a user