summaryrefslogtreecommitdiffstats
path: root/src/dbus/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/doc')
-rw-r--r--src/dbus/doc/qtdbus.qdocconf8
-rw-r--r--src/dbus/doc/snippets/CMakeLists.txt5
-rw-r--r--src/dbus/doc/snippets/cmake/examples.cmake3
-rw-r--r--src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc51
-rw-r--r--src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp51
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp79
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusargument.cpp51
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp53
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusinterface.cpp51
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp51
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp55
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbuspendingreply.cpp51
-rw-r--r--src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp51
-rw-r--r--src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp51
-rw-r--r--src/dbus/doc/src/dbus-adaptors.qdoc44
-rw-r--r--src/dbus/doc/src/dontdocument.qdoc28
-rw-r--r--src/dbus/doc/src/includes/cmake-find-package-dbus.qdocinc5
-rw-r--r--src/dbus/doc/src/qdbusxml2cpp.qdoc28
-rw-r--r--src/dbus/doc/src/qt6-changes.qdoc30
-rw-r--r--src/dbus/doc/src/qtdbus-cmake.qdoc147
-rw-r--r--src/dbus/doc/src/qtdbus-examples.qdoc28
-rw-r--r--src/dbus/doc/src/qtdbus-index.qdoc229
-rw-r--r--src/dbus/doc/src/qtdbus-module.qdoc30
-rw-r--r--src/dbus/doc/src/qtdbus-overview.qdoc176
24 files changed, 400 insertions, 956 deletions
diff --git a/src/dbus/doc/qtdbus.qdocconf b/src/dbus/doc/qtdbus.qdocconf
index 35f17b1f34..90ee5743ff 100644
--- a/src/dbus/doc/qtdbus.qdocconf
+++ b/src/dbus/doc/qtdbus.qdocconf
@@ -63,6 +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"
+
+# Enforce zero documentation warnings
+warninglimit = 0
diff --git a/src/dbus/doc/snippets/CMakeLists.txt b/src/dbus/doc/snippets/CMakeLists.txt
index 825a088019..4b4751d4fa 100644
--- a/src/dbus/doc/snippets/CMakeLists.txt
+++ b/src/dbus/doc/snippets/CMakeLists.txt
@@ -1,4 +1,7 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
#! [cmake_use]
-find_package(Qt6 COMPONENTS DBus REQUIRED)
+find_package(Qt6 REQUIRED COMPONENTS DBus)
target_link_libraries(mytarget PRIVATE Qt6::DBus)
#! [cmake_use]
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 5bade40a0b..61afa69790 100644
--- a/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc
+++ b/src/dbus/doc/snippets/code/doc_src_introtodbus.qdoc
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// 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/doc_src_qdbusadaptors.cpp b/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp
index d5de866ae0..1cfb77db99 100644
--- a/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp
+++ b/src/dbus/doc/snippets/code/doc_src_qdbusadaptors.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QString>
#include <QDBusMessage>
#include <QDBusConnection>
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
index e8fb8c81fb..92b9dea909 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusabstractinterface.cpp
@@ -1,58 +1,13 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QString>
#include <QDBusMessage>
#include <QDBusReply>
#include <QDBusInterface>
+using namespace Qt::StringLiterals;
+
class Abstract_DBus_Interface : public QObject
{
Q_OBJECT
@@ -81,23 +36,33 @@ void Abstract_DBus_Interface::interfaceMain()
QString value = retrieveValue();
QDBusMessage reply;
-QDBusReply<int> api = interface->call(QLatin1String("GetAPIVersion"));
+QDBusReply<int> api = interface->call("GetAPIVersion"_L1);
if (api >= 14)
- reply = interface->call(QLatin1String("ProcessWorkUnicode"), value);
+ reply = interface->call("ProcessWorkUnicode"_L1, value);
else
- reply = interface->call(QLatin1String("ProcessWork"), QLatin1String("UTF-8"), value.toUtf8());
+ reply = interface->call("ProcessWork"_L1, "UTF-8"_L1, value.toUtf8());
//! [0]
}
void Abstract_DBus_Interface::asyncCall()
{
//! [1]
-QString value = retrieveValue();
-QDBusPendingCall pcall = interface->asyncCall(QLatin1String("Process"), 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_qdbusargument.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusargument.cpp
index cf698c79bf..5cb6ce5bb2 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbusargument.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusargument.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QString>
#include <QDBusArgument>
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
index 901b29e205..75b4394595 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuscontext.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QString>
#include <QDBusConnection>
@@ -84,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_qdbusinterface.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusinterface.cpp
index d08ced6ece..06d654b97b 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbusinterface.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusinterface.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QDBusInterface>
#include <QDBusReply>
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp
index e295358b60..c9e5281cdb 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusmetatype.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtCore/qlist.h>
typedef QList<QString> MyClass;
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
index d75a19b62f..67b019a67d 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingcall.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QDBusPendingCall>
#include <QDBusInterface>
#include <QDBusPendingReply>
@@ -80,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/snippets/code/src_qdbus_qdbuspendingreply.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingreply.cpp
index 9a37e7bb09..04f707dba8 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingreply.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbuspendingreply.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QDBusPendingCall>
#include <QDBusInterface>
#include <QDBusPendingReply>
diff --git a/src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp b/src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp
index 30bd422d2c..2def08bdfe 100644
--- a/src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp
+++ b/src/dbus/doc/snippets/code/src_qdbus_qdbusreply.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QDBusPendingCall>
#include <QDBusInterface>
#include <QDBusPendingReply>
diff --git a/src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp b/src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp
index 92b4be9829..9029fa8cf7 100644
--- a/src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp
+++ b/src/dbus/doc/snippets/qdbusextratypes/qdbusextratypes.cpp
@@ -1,52 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtCore>
diff --git a/src/dbus/doc/src/dbus-adaptors.qdoc b/src/dbus/doc/src/dbus-adaptors.qdoc
index d2a5ac27a8..e57cc095b9 100644
--- a/src/dbus/doc/src/dbus-adaptors.qdoc
+++ b/src/dbus/doc/src/dbus-adaptors.qdoc
@@ -1,36 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page usingadaptors.html
\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
@@ -68,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
@@ -111,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.
@@ -190,7 +166,7 @@
The delayed reply itself is requested from Qt D-Bus by calling
QDBusMessage::reply() on the original message. It then becomes the
- resposibility of the called code to eventually send a reply to the
+ responsibility of the called code to eventually send a reply to the
caller.
\warning When a caller places a method call and waits for a reply, it will
@@ -217,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/dontdocument.qdoc b/src/dbus/doc/src/dontdocument.qdoc
index bbb8acb53c..c217ca9276 100644
--- a/src/dbus/doc/src/dontdocument.qdoc
+++ b/src/dbus/doc/src/dontdocument.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\dontdocument (QTypeInfo QMetaTypeId QDBusAbstractInterfaceBase QDBusPendingReplyData QMetaTypeId2)
diff --git a/src/dbus/doc/src/includes/cmake-find-package-dbus.qdocinc b/src/dbus/doc/src/includes/cmake-find-package-dbus.qdocinc
new file mode 100644
index 0000000000..1ed1c6a8ec
--- /dev/null
+++ b/src/dbus/doc/src/includes/cmake-find-package-dbus.qdocinc
@@ -0,0 +1,5 @@
+The command is defined in the \c DBus component of the \c Qt6 package. Load the package with:
+
+\code
+find_package(Qt6 REQUIRED COMPONENTS DBus)
+\endcode
diff --git a/src/dbus/doc/src/qdbusxml2cpp.qdoc b/src/dbus/doc/src/qdbusxml2cpp.qdoc
index 1dd8a9af7a..d63453bf78 100644
--- a/src/dbus/doc/src/qdbusxml2cpp.qdoc
+++ b/src/dbus/doc/src/qdbusxml2cpp.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page qdbusxml2cpp.html
diff --git a/src/dbus/doc/src/qt6-changes.qdoc b/src/dbus/doc/src/qt6-changes.qdoc
index dc1553b360..80cd56c627 100644
--- a/src/dbus/doc/src/qt6-changes.qdoc
+++ b/src/dbus/doc/src/qt6-changes.qdoc
@@ -1,35 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\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 f4432fb741..86807af6e5 100644
--- a/src/dbus/doc/src/qtdbus-cmake.qdoc
+++ b/src/dbus/doc/src/qtdbus-cmake.qdoc
@@ -1,39 +1,34 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+\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
+
+\code
+find_package(Qt6 REQUIRED COMPONENTS DBus)
+\endcode
+
+\sa{CMake Command Reference}
+*/
/*!
\page qtdbus-cmake-qt-add-dbus-interface.html
\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.}
+
+\include cmake-find-package-dbus.qdocinc
-\brief Generates C++ sources implementing an interface for a D-Bus interface
-description file.
+\cmakecommandsince 6.0
\section1 Synopsis
@@ -67,7 +62,7 @@ class named after the interface name, with a namespaced alias:
\section1 Options
-Options can be set using \c set_source_file_property on the \c dbus_spec:
+Options can be set using \c set_source_files_properties on the \c dbus_spec:
\table
\header
@@ -94,10 +89,14 @@ Options can be set using \c set_source_file_property on the \c dbus_spec:
\ingroup cmake-commands-qtdbus
\title qt_add_dbus_interfaces
-\target qt6_add_dbus_interface
+\keyword qt6_add_dbus_interfaces
-\brief Generates C++ sources implementing interfaces for D-Bus interface
-description files.
+\summary {Generates C++ sources implementing interfaces for D-Bus interface
+description files.}
+
+\include cmake-find-package-dbus.qdocinc
+
+\cmakecommandsince 6.0
\section1 Synopsis
@@ -123,7 +122,7 @@ The generated C++ source files are named after the XML file: For the file
\section1 Options
-Options can be set using \c set_source_file_property on each of the file
+Options can be set using \c set_source_files_properties on each of the file
arguments:
\table
@@ -151,9 +150,13 @@ 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.}
-\brief Generates a D-Bus interface from a header file.
+\include cmake-find-package-dbus.qdocinc
+
+\cmakecommandsince 6.0
\section1 Synopsis
@@ -169,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
@@ -186,9 +189,13 @@ 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.}
+
+\include cmake-find-package-dbus.qdocinc
-\brief Generates an adaptor class for a D-Bus interface.
+\cmakecommandsince 6.0
\section1 Synopsis
@@ -236,3 +243,65 @@ argument.
\snippet cmake/examples.cmake qt_add_dbus_adaptor
*/
+
+/*!
+\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:
+
+\sa{CMake Property Reference}
+*/
+
+/*!
+\page cmake-source-file-property-classname.html
+\ingroup cmake-source-file-properties-qtdbus
+
+\title CLASSNAME
+\target cmake-source-file-property-CLASSNAME
+
+\summary {Overrides the default interface class name.}
+
+\cmakepropertysince 5.0
+
+When this property is set, the generated C++ class name is overridden
+with the provided property value.
+
+\sa{qt6_add_dbus_interface}{qt_add_dbus_interface}
+*/
+
+/*!
+\page cmake-source-file-property-include.html
+\ingroup cmake-source-file-properties-qtdbus
+
+\title INCLUDE
+\target cmake-source-file-property-INCLUDE
+
+\summary {Adds an include path.}
+
+\cmakepropertysince 5.0
+
+When this property is set, an #include "path" is added
+to the generated C++ file.
+
+\sa{qt6_add_dbus_interface}{qt_add_dbus_interface}
+*/
+
+/*!
+\page cmake-source-file-property-no-namespace.html
+\ingroup cmake-source-file-properties-qtdbus
+
+\title NO_NAMESPACE
+\target cmake-source-file-property-NO_NAMESPACE
+
+\summary {Disables generation of a namespaced name.}
+
+\cmakepropertysince 5.0
+
+When this property is set, the generated C++ class will not contain a namespaced alias.
+
+\sa{qt6_add_dbus_interface}{qt_add_dbus_interface}
+*/
+
diff --git a/src/dbus/doc/src/qtdbus-examples.qdoc b/src/dbus/doc/src/qtdbus-examples.qdoc
index a35207ddee..9b55e3f3f7 100644
--- a/src/dbus/doc/src/qtdbus-examples.qdoc
+++ b/src/dbus/doc/src/qtdbus-examples.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\group examples-dbus
diff --git a/src/dbus/doc/src/qtdbus-index.qdoc b/src/dbus/doc/src/qtdbus-index.qdoc
index afd70c2f7c..05ca38a207 100644
--- a/src/dbus/doc/src/qtdbus-index.qdoc
+++ b/src/dbus/doc/src/qtdbus-index.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page qtdbus-index.html
@@ -32,188 +8,62 @@
\keyword QtDBus
-
- \section1 Introduction
-
D-Bus is an Inter-Process Communication (IPC) and Remote Procedure
Calling (RPC) mechanism originally developed for Linux to replace
existing and competing IPC solutions with one unified protocol. It
- has also been designed to allow communication between system-level
+ was also designed to allow communication between system-level
processes (such as printer and hardware driver services) and
normal user processes.
It uses a fast, binary message-passing protocol, which is suitable
for same-machine communication due to its low latency and low
overhead. Its specification is currently defined by the
- \tt{freedesktop.org} project, and is available to all parties.
+ \tt{freedesktop.org} project and is available to all parties.
- Communication in general happens through a central server
- application, called the "bus" (hence the name), but direct
+ Communication, in general, happens through a central server
+ application called the "bus" (hence the name), but direct
application-to-application communication is also possible. When
communicating on a bus, applications can query which other
applications and services are available, as well as activate one
on demand.
- \section1 The Buses
-
- D-Bus buses are used to when many-to-many communication is
- desired. In order to achieve that, a central server is launched
- before any applications can connect to the bus: this server is
- responsible for keeping track of the applications that are
- connected and for properly routing messages from their source to
- their destination.
-
- In addition, D-Bus defines two well-known buses, called the
- system bus and the session bus. These buses are special in the
- sense that they have well-defined semantics: some services are
- defined to be found in one or both of these buses.
-
- For example, an application wishing to query the list of hardware
- devices attached to the computer will probably communicate to a
- service available on the system bus, while the service providing
- opening of the user's web browser will be probably found on the
- session bus.
-
- On the system bus, one can also expect to find restrictions on
- what services each application is allowed to offer. Therefore, one
- can be reasonably certain that, if a certain service is present,
- it is being offered by a trusted application.
-
- \section1 Concepts
-
- \section2 Messages
-
- On the low level, applications communicate over D-Bus by sending
- messages to one another. Messages are used to relay the remote
- procedure calls as well as the replies and errors associated
- with them. When used over a bus, messages have a destination,
- which means they are routed only to the interested parties,
- avoiding congestion due to "swarming" or broadcasting.
-
- A special kind of message called a "signal message"
- (a concept based on Qt's \l {Signals and Slots} mechanism),
- however, does not have a pre-defined destination. Since its
- purpose is to be used in a one-to-many context, signal messages
- are designed to work over an "opt-in" mechanism.
-
- The Qt D-Bus module fully encapsulates the low-level concept of
- messages into a simpler, object-oriented approach familiar to Qt
- developers. In most cases, the developer need not worry about
- sending or receiving messages.
-
- \section2 Service Names
-
- When communicating over a bus, applications obtain what is
- called a "service name": it is how that application chooses to be
- known by other applications on the same bus. The service names
- are brokered by the D-Bus bus daemon and are used to
- route messages from one application to another. An analogous
- concept to service names are IP addresses and hostnames: a
- computer normally has one IP address and may have one or more
- hostnames associated with it, according to the services that it
- provides to the network.
-
- On the other hand, if a bus is not used, service names are also
- not used. If we compare this to a computer network again, this
- would equate to a point-to-point network: since the peer is
- known, there is no need to use hostnames to find it or its IP
- address.
-
- The format of a D-Bus service name is in fact very similar to a
- host name: it is a dot-separated sequence of letters and
- digits. The common practice is even to name one's service name
- according to the domain name of the organization that defined
- that service.
-
- For example, the D-Bus service is defined by
- \tt{freedesktop.org} and can be found on the bus under the
- service name:
-
- \snippet code/doc_src_introtodbus.qdoc 0
-
- \section2 Object Paths
-
- Like network hosts, applications provide specific services to
- other applications by exporting objects. Those objects are
- hierarchically organised, much like the parent-child
- relationship that classes derived from QObject possess. One
- difference, however, is that there is the concept of "root
- object", that all objects have as ultimate parent.
-
- If we continue our analogy with Web services, object paths
- equate to the path part of a URL:
-
- \image qurl-ftppath.png
-
- Like them, object paths in D-Bus are formed resembling path
- names on the filesystem: they are slash-separated labels, each
- consisting of letters, digits and the underscore character
- ("_"). They must always start with a slash and must not end with
- one.
-
- \section2 Interfaces
+ \section1 Using the Module
- Interfaces are similar to C++ abstract classes and Java's
- \c interface keyword and declare the "contract" that is
- established between caller and callee. That is, they establish
- the names of the methods, signals and properties that are
- available as well as the behavior that is expected from either
- side when communication is established.
+ \include {module-use.qdocinc} {using the c++ api}
- Qt uses a very similar mechanism in its \l {How to Create Qt
- Plugins}{Plugin system}: Base classes in C++ are associated
- with a unique identifier by way of the Q_DECLARE_INTERFACE()
- macro.
+ \include {module-use.qdocinc} {building with cmake} {DBus}
- D-Bus interface names are, in fact, named in a manner similar to
- what is suggested by the Qt Plugin System: an identifier usually
- constructed from the domain name of the entity that defined that
- interface.
+ \section1 Articles and Guides
- \section2 Cheat Sheet
-
- To facilitate remembering of the naming formats and their
- purposes, the following table can be used:
-
- \table 90%
- \header \li D-Bus Concept \li Analogy \li Name format
- \row \li Service name \li Network hostnames \li Dot-separated
- ("looks like a hostname")
- \row \li Object path \li URL path component \li Slash-separated
- ("looks like a path")
- \row \li Interface \li Plugin identifier \li Dot-separated
- \endtable
-
- \section1 Debugging
-
- When developing applications that use D-Bus, it is sometimes useful to be able
- to see information about the messages that are sent and received across the
- bus by each application.
-
- 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
- car in the following way:
-
- \snippet code/doc_src_introtodbus.qdoc QDBUS_DEBUG
-
- Information about the messages will be written to the console the application
- was launched from.
+ The following documents contain information about Qt's D-Bus integration
+ features and provide details about the mechanisms used to send and receive
+ type information over the bus:
+ \list
+ \li \l {Qt D-Bus Overview}
+ \li \l {Using Qt D-Bus Adaptors}
+ \li \l {The Qt D-Bus Type System}
+ \li \l {Qt D-Bus XML compiler (qdbusxml2cpp)}
+ \li \l{D-Bus Viewer}
+ \endlist
- \include module-use.qdocinc using qt module
- \snippet snippets/CMakeLists.txt cmake_use
+ \section1 Examples
- See also the \l {Build with CMake} overview.
+ \list
+ \li \l{Qt D-Bus Examples}
+ \endlist
- \include module-use.qdocinc building with qmake
- \snippet snippets/snippets.pro qmake_use
+ \section1 Reference
+ \list
+ \li \l{Qt D-Bus C++ Classes}
+ \li \l{CMake Commands in Qt6 DBus}
+ \endlist
\section1 Module Evolution
+
\l{Changes to Qt D-Bus} lists important changes in the module API
- and functionality that were done for the Qt 6 series of Qt.
+ and functionality that were made for the Qt 6 series of Qt.
\section1 Licenses and Attributions
@@ -224,24 +74,9 @@
See \l{Qt Licensing} for further details.
Furthermore, Qt D-Bus in Qt \QtVersion may contain third party
- modules under following permissive licenses:
+ modules under the following permissive licenses:
\generatelist{groupsbymodule attributions-qtdbus}
-
- \section1 Further Reading
-
- The following documents contain information about Qt's D-Bus integration
- features, and provide details about the mechanisms used to send and receive
- type information over the bus:
-
- \list
- \li \l{Using Qt D-Bus Adaptors}
- \li \l{The Qt D-Bus Type System}
- \li \l{Qt D-Bus XML compiler (qdbusxml2cpp)}
- \li \l{Qt D-Bus C++ Classes}
- \li \l{Qt D-Bus Examples}
- \li \l{D-Bus Viewer}
- \endlist
*/
/*!
diff --git a/src/dbus/doc/src/qtdbus-module.qdoc b/src/dbus/doc/src/qtdbus-module.qdoc
index 04b729bfde..c89b4dc937 100644
--- a/src/dbus/doc/src/qtdbus-module.qdoc
+++ b/src/dbus/doc/src/qtdbus-module.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\module QtDBus
@@ -32,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
new file mode 100644
index 0000000000..6342e674fd
--- /dev/null
+++ b/src/dbus/doc/src/qtdbus-overview.qdoc
@@ -0,0 +1,176 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \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
+ existing and competing IPC solutions with one unified protocol. It
+ was also designed to allow communication between system-level
+ processes (such as printer and hardware driver services) and
+ normal user processes.
+
+ It uses a fast, binary message-passing protocol, which is suitable
+ for same-machine communication due to its low latency and low
+ overhead. Its specification is currently defined by the
+ \tt{freedesktop.org} project and is available to all parties.
+
+ Communication, in general, happens through a central server
+ application called the "bus" (hence the name), but direct
+ application-to-application communication is also possible. When
+ communicating on a bus, applications can query which other
+ applications and services are available, as well as activate one
+ on demand.
+
+ \section1 The Buses
+
+ D-Bus buses are used when many-to-many communication is
+ desired. In order to achieve that, a central server is launched
+ before any application can connect to the bus. This server is
+ responsible for keeping track of the applications that are
+ connected and for properly routing messages from their source to
+ their destination.
+
+ In addition, D-Bus defines two well-known buses, called the
+ system bus and the session bus. These buses are special in the
+ sense that they have well-defined semantics: some services are
+ defined to be found in one or both of these buses.
+
+ For example, an application wishing to query the list of hardware
+ devices attached to the computer will probably communicate to a
+ service available on the system bus, while the service providing
+ opening of the user's web browser will probably be found on the
+ session bus.
+
+ On the system bus, you can also expect to find restrictions on
+ what services each application is allowed to offer. Therefore, you
+ can be reasonably certain that if a certain service is present,
+ it's being offered by a trusted application.
+
+ \section1 Concepts
+
+ \section2 Messages
+
+ On the low level, applications communicate over D-Bus by sending
+ messages to one another. Messages are used to relay the remote
+ procedure calls as well as the replies and errors associated
+ with them. When used over a bus, messages have a destination,
+ which means they are routed only to the interested parties,
+ avoiding congestion due to "swarming" or broadcasting.
+
+ A special kind of message called a "signal message"
+ (a concept based on Qt's \l {Signals and Slots} mechanism),
+ however, does not have a pre-defined destination. Since its
+ purpose is to be used in a one-to-many context, signal messages
+ are designed to work over an "opt-in" mechanism.
+
+ The Qt D-Bus module fully encapsulates the low-level concept of
+ messages into a simpler, object-oriented approach familiar to Qt
+ developers. In most cases, the developer need not worry about
+ sending or receiving messages.
+
+ \section2 Service Names
+
+ When communicating over a bus, applications obtain what is
+ called a "service name": it is how that application chooses to be
+ known by other applications on the same bus. The service names
+ are brokered by the D-Bus bus daemon and are used to
+ route messages from one application to another. An analogous
+ concept to service names are IP addresses and hostnames: a
+ computer normally has one IP address and may have one or more
+ hostnames associated with it, according to the services that it
+ provides to the network.
+
+ On the other hand, if a bus is not used, service names are also
+ not used. If we compare this to a computer network again, this
+ would equate to a point-to-point network: since the peer is
+ known, there is no need to use hostnames to find it or its IP
+ address.
+
+ The format of a D-Bus service name is in fact very similar to a
+ host name: it is a dot-separated sequence of letters and
+ digits. The common practice is even to name your service name
+ according to the domain name of the organization that defined
+ that service.
+
+ For example, the D-Bus service is defined by
+ \tt{freedesktop.org} and can be found on the bus under the
+ service name:
+
+ \snippet code/doc_src_introtodbus.qdoc 0
+
+ \section2 Object Paths
+
+ Like network hosts, applications provide specific services to
+ other applications by exporting objects. Those objects are
+ hierarchically organized, much like the parent-child
+ relationship that classes derived from QObject possess. One
+ difference, however, is that there is the concept of "root
+ object", which all objects have as the ultimate parent.
+
+ If we continue our analogy with Web services, object paths
+ equate to the path part of a URL:
+
+ \image qurl-ftppath.png
+
+ Like them, object paths in D-Bus are formed resembling path
+ names on the filesystem: they are slash-separated labels, each
+ consisting of letters, digits and the underscore character
+ ("\_"). They must always start with a slash and must not end with
+ one.
+
+ \section2 Interfaces
+
+ Interfaces are similar to C++ abstract classes and Java's
+ \c interface keyword and declare the "contract" that is
+ established between caller and callee. That is, they establish
+ the names of the methods, signals, and properties that are
+ available as well as the behavior that is expected from either
+ side when communication is established.
+
+ Qt uses a very similar mechanism in its \l {How to Create Qt
+ Plugins}{Plugin system}: Base classes in C++ are associated
+ with a unique identifier by way of the Q_DECLARE_INTERFACE()
+ macro.
+
+ D-Bus interface names are, in fact, named in a manner similar to
+ what is suggested by the Qt Plugin System: an identifier usually
+ constructed from the domain name of the entity that defined that
+ interface.
+
+ \section2 Cheat Sheet
+
+ To facilitate remembering of the naming formats and their
+ purposes, the following table can be used:
+
+ \table 90%
+ \header \li D-Bus Concept \li Analogy \li Name format
+ \row \li Service name \li Network hostnames \li Dot-separated
+ ("looks like a hostname")
+ \row \li Object path \li URL path component \li Slash-separated
+ ("looks like a path")
+ \row \li Interface \li Plugin identifier \li Dot-separated
+ \endtable
+
+ \section1 Debugging
+
+ When developing applications that use D-Bus, it is sometimes useful to be able
+ to see information about the messages that are sent and received across the
+ bus by each application.
+
+ 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
+ car in the following way:
+
+ \snippet code/doc_src_introtodbus.qdoc QDBUS_DEBUG
+
+ Information about the messages will be written to the console the application
+ was launched from.
+
+*/