diff options
author | David Faure <david.faure@kdab.com> | 2023-11-21 12:40:56 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2023-11-22 07:18:08 +0100 |
commit | 6ea2a12e27ecf5ab2190c33ca66ab08f23c72350 (patch) | |
tree | 0963110e13c59d6bc87b599268788661d34bdc7c /tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp | |
parent | c1415a6a6c83f9eaf3db49b62f4923d24ef19d6d (diff) |
QDBusConnection: output error message from findSlot
This helps debugging why an adaptor's method fails to be called.
Example output:
QDBusConnection: couldn't handle call to LaunchCommand: Type not registered with QtDBus in parameter list: QByteArrayList
tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall shows many warnings
after this commit, since it's testing many cases of "no such slot".
Pick-to: 6.0 6.1 5.15
Change-Id: Ic4ddcd91d005555a02d531fc8960aea2c809e20b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp')
-rw-r--r-- | tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp index c5952c3b36..52c1ee8fa1 100644 --- a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp +++ b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp @@ -4,6 +4,7 @@ #include <QCoreApplication> #include <QDBusMessage> #include <QDBusConnection> +#include <QLoggingCategory> static const char serviceName[] = "org.qtproject.autotests.qpong"; static const char objectPath[] = "/org/qtproject/qpong"; @@ -32,6 +33,9 @@ int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); + // Silence many warnings from findSlot() about ping() not having the expected argument types + QLoggingCategory::setFilterRules("qt.dbus.integration=false"); + QDBusConnection con = QDBusConnection::sessionBus(); if (!con.isConnected()) exit(1); |