summaryrefslogtreecommitdiffstats
path: root/src/dbus/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/doc')
-rw-r--r--src/dbus/doc/qtdbus.qdocconf7
-rw-r--r--src/dbus/doc/snippets/CMakeLists.txt3
-rw-r--r--src/dbus/doc/snippets/cmake/examples.cmake3
-rw-r--r--src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc2
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp20
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp2
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp4
-rw-r--r--src/dbus/doc/src/dbus-adaptors.qdoc14
-rw-r--r--src/dbus/doc/src/qt6-changes.qdoc2
-rw-r--r--src/dbus/doc/src/qtdbus-cmake.qdoc18
-rw-r--r--src/dbus/doc/src/qtdbus-module.qdoc2
-rw-r--r--src/dbus/doc/src/qtdbus-overview.qdoc3
12 files changed, 49 insertions, 31 deletions
diff --git a/src/dbus/doc/qtdbus.qdocconf b/src/dbus/doc/qtdbus.qdocconf
index b23c5fb121..90ee5743ff 100644
--- a/src/dbus/doc/qtdbus.qdocconf
+++ b/src/dbus/doc/qtdbus.qdocconf
@@ -63,9 +63,8 @@ qhp.QtDBus.subprojects.examples.selectors = fake:example
navigation.landingpage = "Qt D-Bus"
navigation.cppclassespage = "Qt D-Bus C++ Classes"
-manifestmeta.thumbnail.names = "QtDBus/D-Bus List Names Example" \
- "QtDBus/D-Bus Ping Pong Example" \
- "QtDBus/D-Bus Complex Ping Pong Example"
+manifestmeta.thumbnail.names = "QtDBus/D-Bus Ping Pong" \
+ "QtDBus/D-Bus Complex Ping Pong"
-# Fail the documentation build if there are more warnings than the limit
+# Enforce zero documentation warnings
warninglimit = 0
diff --git a/src/dbus/doc/snippets/CMakeLists.txt b/src/dbus/doc/snippets/CMakeLists.txt
index 516a3cd67c..4b4751d4fa 100644
--- a/src/dbus/doc/snippets/CMakeLists.txt
+++ b/src/dbus/doc/snippets/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#! [cmake_use]
find_package(Qt6 REQUIRED COMPONENTS DBus)
target_link_libraries(mytarget PRIVATE Qt6::DBus)
diff --git a/src/dbus/doc/snippets/cmake/examples.cmake b/src/dbus/doc/snippets/cmake/examples.cmake
index 3aa1f013bd..2bb6b63abb 100644
--- a/src/dbus/doc/snippets/cmake/examples.cmake
+++ b/src/dbus/doc/snippets/cmake/examples.cmake
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#! [qt_add_dbus_adaptor]
qt_add_dbus_adaptor(GENERATED_SOURCES org.example.chat.xml chat.h ChatMainWindow)
#! [qt_add_dbus_adaptor]
diff --git a/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc b/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc
index d39151354a..61afa69790 100644
--- a/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc
+++ b/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
//! [0]
org.freedesktop.DBus
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
index 5348d18ba3..92b9dea909 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
@@ -47,12 +47,22 @@ else
void Abstract_DBus_Interface::asyncCall()
{
//! [1]
-QString value = retrieveValue();
-QDBusPendingCall pcall = interface->asyncCall("Process"_L1, value);
+QDBusPendingCall pcall = interface->asyncCall("GetAPIVersion"_L1);
+auto watcher = new QDBusPendingCallWatcher(pcall, this);
-QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall);
+QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this,
+ [&](QDBusPendingCallWatcher *w) {
+ QString value = retrieveValue();
+ QDBusPendingReply<int> reply(*w);
+ QDBusPendingCall pcall;
+ if (reply.argumentAt<0>() >= 14)
+ pcall = interface->asyncCall("ProcessWorkUnicode"_L1, value);
+ else
+ pcall = interface->asyncCall("ProcessWork"_L1, "UTF-8"_L1, value.toUtf8());
-QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*)));
+ w = new QDBusPendingCallWatcher(pcall);
+ QObject::connect(w, &QDBusPendingCallWatcher::finished, this,
+ &Abstract_DBus_Interface::callFinishedSlot);
+});
//! [1]
}
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
index 9e4e26cb4e..75b4394595 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
@@ -37,7 +37,7 @@ QString MyObject::methodWithDelayedReply()
conn = connection();
msg = message();
setDelayedReply(true);
- QMetaObject::invokeMethod(this, "process", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, &MyObject::process, Qt::QueuedConnection);
return QString();
}
//! [0]
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
index c44337ade2..67b019a67d 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
@@ -33,8 +33,8 @@ void DBus_PendingCall_Interface::callInterfaceMain()
QDBusPendingCall async = iface->asyncCall("RemoteMethod", value1, value2);
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(async, this);
- QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*)));
+ QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this,
+ &DBus_PendingCall_Interface::callFinishedSlot);
//! [0]
}
diff --git a/src/dbus/doc/src/dbus-adaptors.qdoc b/src/dbus/doc/src/dbus-adaptors.qdoc
index 3dbedbbcce..e57cc095b9 100644
--- a/src/dbus/doc/src/dbus-adaptors.qdoc
+++ b/src/dbus/doc/src/dbus-adaptors.qdoc
@@ -6,7 +6,7 @@
\title Using Qt D-Bus Adaptors
\brief How to create and use DBus adaptors in Qt.
- \ingroup best-practices
+ \ingroup how-to
Adaptors are special classes that are attached to any QObject-derived class
and provide the interface to the external world using D-Bus. Adaptors are
@@ -44,7 +44,7 @@
\li \l{Declaring Slots in D-Bus Adaptors}
\li \l{Declaring Signals in D-Bus Adaptors}
\li \l{The Qt D-Bus Type System}
- \li In the \l{D-Bus Complex Ping Pong Example}, \c complexpong.h and
+ \li In the \l{D-Bus Complex Ping Pong} example, \c complexpong.h and
\c complexpong.cpp show an implementation of QDBusAbstractAdaptor.
\endlist
@@ -87,15 +87,15 @@
Asynchronous slots are marked by the keyword \l Q_NOREPLY in the method
signature, before the \c void return type and the slot name. The \c quit()
- slot in the \l {D-Bus Complex Ping Pong Example} is an example of this.
+ slot in the \l {D-Bus Complex Ping Pong} example is an example of this.
\section1 Input-Only Slots
Input-only slots are normal slots that take parameters passed by value or
by constant reference. However, unlike asynchronous slots, the caller is
usually waiting for completion of the callee before resuming operation.
- Therefore, non-asynchronous slots should not block or should state it its
- documentation that they may do so.
+ Therefore, non-asynchronous slots should not block or should explicitly
+ state it will block in its documentation that they may do so.
Input-only slots have no special marking in their signature, except that
they take only parameters passed by value or by constant reference.
@@ -193,8 +193,8 @@
However, signals must still be emitted. The easiest way to emit an adaptor
signal is to connect another signal to it, so that Qt's signals and slots
mechanism automatically emits the adaptor signal, too. This can be done in
- the adaptor's constructor, as you can see in the \l {D-Bus Complex Ping
- Pong Example}.
+ the adaptor's constructor, as you can see in the \l {D-Bus Complex Ping Pong}
+ example.
The QDBusAbstractAdaptor::setAutoRelaySignals() convenience function can also
be used to make and break connections between signals in the real object and
diff --git a/src/dbus/doc/src/qt6-changes.qdoc b/src/dbus/doc/src/qt6-changes.qdoc
index c9e73a187a..80cd56c627 100644
--- a/src/dbus/doc/src/qt6-changes.qdoc
+++ b/src/dbus/doc/src/qt6-changes.qdoc
@@ -5,7 +5,7 @@
\page dbus-changes-qt6.html
\title Changes to Qt D-Bus
\ingroup changes-qt-5-to-6
- \brief Migrate Qt DBus to Qt 6.
+ \brief Minimal porting effort to be able to switch to Qt 6.
Qt 6 is a result of the conscious effort to make the framework more
efficient and easy to use.
diff --git a/src/dbus/doc/src/qtdbus-cmake.qdoc b/src/dbus/doc/src/qtdbus-cmake.qdoc
index 227642bfb7..86807af6e5 100644
--- a/src/dbus/doc/src/qtdbus-cmake.qdoc
+++ b/src/dbus/doc/src/qtdbus-cmake.qdoc
@@ -4,6 +4,7 @@
/*!
\group cmake-commands-qtdbus
\title CMake Commands in Qt6 DBus
+\brief Lists CMake commands defined in Qt6::DBus.
The following CMake commands are defined when Qt6::DBus is loaded, for instance
with
@@ -20,7 +21,7 @@ find_package(Qt6 REQUIRED COMPONENTS DBus)
\ingroup cmake-commands-qtdbus
\title qt_add_dbus_interface
-\target qt6_add_dbus_interface
+\keyword qt6_add_dbus_interface
\summary {Generates C++ sources implementing an interface for a D-Bus interface
description file.}
@@ -88,7 +89,7 @@ Options can be set using \c set_source_files_properties on the \c dbus_spec:
\ingroup cmake-commands-qtdbus
\title qt_add_dbus_interfaces
-\target qt6_add_dbus_interfaces
+\keyword qt6_add_dbus_interfaces
\summary {Generates C++ sources implementing interfaces for D-Bus interface
description files.}
@@ -149,7 +150,7 @@ arguments:
\ingroup cmake-commands-qtdbus
\title qt_generate_dbus_interface
-\target qt6_generate_dbus_interface
+\keyword qt6_generate_dbus_interface
\summary {Generates a D-Bus interface from a header file.}
@@ -171,7 +172,7 @@ qt_generate_dbus_interface(header
\section1 Description
Parses the C++ source or header file containing a QObject-derived class
-declaration and generates a file containing the D-BUS Introspection XML.
+declaration and generates a file containing the D-Bus Introspection XML.
By default, the generated XML file is stored in the current binary directory,
and has the same base name as the header. You can specify a different name or
@@ -188,7 +189,7 @@ arguments to the tool can be set after \c{OPTIONS}.
\ingroup cmake-commands-qtdbus
\title qt_add_dbus_adaptor
-\target qt6_add_dbus_adaptor
+\keyword qt6_add_dbus_adaptor
\summary {Generates an adaptor class for a D-Bus interface.}
@@ -246,6 +247,7 @@ argument.
/*!
\group cmake-source-file-properties-qtdbus
\title CMake Source File Properties in Qt6 DBus
+\brief Lists CMake file properties used in Qt6::DBus.
\l{CMake Commands in Qt6 DBus}{CMake Commands} know about the following CMake
source file properties:
@@ -254,7 +256,7 @@ source file properties:
*/
/*!
-\page cmake-source-file-property-CLASSNAME.html
+\page cmake-source-file-property-classname.html
\ingroup cmake-source-file-properties-qtdbus
\title CLASSNAME
@@ -271,7 +273,7 @@ with the provided property value.
*/
/*!
-\page cmake-source-file-property-INCLUDE.html
+\page cmake-source-file-property-include.html
\ingroup cmake-source-file-properties-qtdbus
\title INCLUDE
@@ -288,7 +290,7 @@ to the generated C++ file.
*/
/*!
-\page cmake-source-file-property-NO_NAMESPACE.html
+\page cmake-source-file-property-no-namespace.html
\ingroup cmake-source-file-properties-qtdbus
\title NO_NAMESPACE
diff --git a/src/dbus/doc/src/qtdbus-module.qdoc b/src/dbus/doc/src/qtdbus-module.qdoc
index 03bba6d952..c89b4dc937 100644
--- a/src/dbus/doc/src/qtdbus-module.qdoc
+++ b/src/dbus/doc/src/qtdbus-module.qdoc
@@ -8,7 +8,7 @@
to perform Inter-Process Communication using the \l{Qt D-Bus}{D-Bus} protocol.
\ingroup modules
- \qtcmakepackage Dbus
+ \qtcmakepackage DBus
\qtvariable dbus
\keyword The QDBus compiler
diff --git a/src/dbus/doc/src/qtdbus-overview.qdoc b/src/dbus/doc/src/qtdbus-overview.qdoc
index b40caf24a6..6342e674fd 100644
--- a/src/dbus/doc/src/qtdbus-overview.qdoc
+++ b/src/dbus/doc/src/qtdbus-overview.qdoc
@@ -5,6 +5,7 @@
\page qtdbus-overview.html
\title Qt D-Bus Overview
\brief Provides insight into the Qt Qt D-Bus module.
+ \ingroup explanations-networkingandconnectivity
D-Bus is an Inter-Process Communication (IPC) and Remote Procedure
Calling (RPC) mechanism originally developed for Linux to replace
@@ -164,7 +165,7 @@
This feature can be enabled on a per-application basis by setting the
\c QDBUS_DEBUG environment variable before running each application.
For example, we can enable debugging only for the car in the
- \l{D-Bus Remote Controlled Car Example} by running the controller and the
+ \l{D-Bus Remote Controlled Car} example by running the controller and the
car in the following way:
\snippet code/doc_src_introtodbus.qdoc QDBUS_DEBUG