mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Don't log UnknownProperty error
When checking notification inhibition support
This commit is contained in:
@@ -149,10 +149,16 @@ void GetInhibitionSupported(Fn<void(bool)> callback) {
|
|||||||
const auto async = QDBusConnection::sessionBus().asyncCall(message);
|
const auto async = QDBusConnection::sessionBus().asyncCall(message);
|
||||||
auto watcher = new QDBusPendingCallWatcher(async);
|
auto watcher = new QDBusPendingCallWatcher(async);
|
||||||
|
|
||||||
|
static const auto DontLogErrors = {
|
||||||
|
QDBusError::NoError,
|
||||||
|
QDBusError::InvalidArgs,
|
||||||
|
QDBusError::UnknownProperty,
|
||||||
|
};
|
||||||
|
|
||||||
const auto finished = [=](QDBusPendingCallWatcher *call) {
|
const auto finished = [=](QDBusPendingCallWatcher *call) {
|
||||||
const auto error = QDBusPendingReply<QVariant>(*call).error();
|
const auto error = QDBusPendingReply<QVariant>(*call).error();
|
||||||
|
|
||||||
if (error.isValid() && error.type() != QDBusError::InvalidArgs) {
|
if (!ranges::contains(DontLogErrors, error.type())) {
|
||||||
LOG(("Native Notification Error: %1: %2")
|
LOG(("Native Notification Error: %1: %2")
|
||||||
.arg(error.name())
|
.arg(error.name())
|
||||||
.arg(error.message()));
|
.arg(error.message()));
|
||||||
|
Reference in New Issue
Block a user