From 20b823f5a7058be42dc8a507e6a828ed3e55d37f Mon Sep 17 00:00:00 2001 From: Alberto Mardegan Date: Sat, 28 Sep 2019 23:00:27 +0300 Subject: [PATCH] Doc: remove wrong documentation for Qt D-Bus delayed replies People implementing D-Bus services *should not* immediately call QDBusConnection::send() when intending to delay their reply, as this indeed causes a reply to be sent to the client. Change-Id: I50817f6b91ac1a02a2a25f6d31e73ad9832f1092 Reviewed-by: Thiago Macieira --- src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp | 1 - src/dbus/doc/src/dbus-adaptors.qdoc | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp b/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp index 0fc7a2b26cb..f5d9fe7889b 100644 --- a/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp +++ b/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp @@ -62,7 +62,6 @@ QString processRequest(const QString &request, const QDBusMessage &message) data->request = request; message.setDelayedReply(true); data->reply = message.createReply(); - QDBusConnection::sessionBus().send(data->reply); appendRequest(data); return QString(); diff --git a/src/dbus/doc/src/dbus-adaptors.qdoc b/src/dbus/doc/src/dbus-adaptors.qdoc index 9ebf0cedf21..3398a45af71 100644 --- a/src/dbus/doc/src/dbus-adaptors.qdoc +++ b/src/dbus/doc/src/dbus-adaptors.qdoc @@ -174,9 +174,6 @@ \snippet code/doc_src_qdbusadaptors.cpp 10 - The use of - \l{QDBusConnection::send()}{QDBusConnection::sessionBus().send(data->reply)} - is needed to explicitly inform the caller that the response will be delayed. In this case, the return value is unimportant; we return an arbitrary value to satisfy the compiler.