all: mask various useless dbus errors

This commit is contained in:
outfoxxed 2025-07-18 04:14:58 -07:00
parent 6572a7f61d
commit ecc4a1249d
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
6 changed files with 106 additions and 61 deletions

View file

@ -222,9 +222,14 @@ void StatusNotifierItem::activate() {
const QDBusPendingReply<> reply = *call;
if (reply.isError()) {
qCWarning(logStatusNotifierItem).noquote()
<< "Error calling Activate method of StatusNotifierItem" << this->properties.toString();
qCWarning(logStatusNotifierItem) << reply.error();
if (reply.error().type() == QDBusError::UnknownMethod) {
qCDebug(logStatusNotifierItem) << "Tried to call Activate method of StatusNotifierItem"
<< this->properties.toString() << "but it does not exist.";
} else {
qCWarning(logStatusNotifierItem).noquote()
<< "Error calling Activate method of StatusNotifierItem" << this->properties.toString();
qCWarning(logStatusNotifierItem) << reply.error();
}
}
delete call;
@ -241,10 +246,16 @@ void StatusNotifierItem::secondaryActivate() {
const QDBusPendingReply<> reply = *call;
if (reply.isError()) {
qCWarning(logStatusNotifierItem).noquote()
<< "Error calling SecondaryActivate method of StatusNotifierItem"
<< this->properties.toString();
qCWarning(logStatusNotifierItem) << reply.error();
if (reply.error().type() == QDBusError::UnknownMethod) {
qCDebug(logStatusNotifierItem)
<< "Tried to call SecondaryActivate method of StatusNotifierItem"
<< this->properties.toString() << "but it does not exist.";
} else {
qCWarning(logStatusNotifierItem).noquote()
<< "Error calling SecondaryActivate method of StatusNotifierItem"
<< this->properties.toString();
qCWarning(logStatusNotifierItem) << reply.error();
}
}
delete call;