mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't log UnknownProperty error
When checking notification inhibition support
This commit is contained in:
parent
ae74f7b3da
commit
c21125f9f2
1 changed files with 7 additions and 1 deletions
|
@ -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()));
|
||||||
|
|
Loading…
Add table
Reference in a new issue