summaryrefslogtreecommitdiffstats
path: root/src/concurrent/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/doc')
-rw-r--r--src/concurrent/doc/qtconcurrent.qdocconf9
-rw-r--r--src/concurrent/doc/snippets/CMakeLists.txt3
-rw-r--r--src/concurrent/doc/snippets/code/src_concurrent_qtconcurrenttask.cpp2
-rw-r--r--src/concurrent/doc/src/qt6-changes.qdoc2
-rw-r--r--src/concurrent/doc/src/qtconcurrent-examples.qdoc14
-rw-r--r--src/concurrent/doc/src/qtconcurrent-index.qdoc6
6 files changed, 31 insertions, 5 deletions
diff --git a/src/concurrent/doc/qtconcurrent.qdocconf b/src/concurrent/doc/qtconcurrent.qdocconf
index 9e8b280f0b..c4efe64d0a 100644
--- a/src/concurrent/doc/qtconcurrent.qdocconf
+++ b/src/concurrent/doc/qtconcurrent.qdocconf
@@ -15,15 +15,18 @@ qhp.QtConcurrent.virtualFolder = qtconcurrent
qhp.QtConcurrent.indexTitle = Qt Concurrent
qhp.QtConcurrent.indexRoot =
-qhp.QtConcurrent.subprojects = classes
+qhp.QtConcurrent.subprojects = classes examples
qhp.QtConcurrent.subprojects.classes.title = C++ Classes
qhp.QtConcurrent.subprojects.classes.indexTitle = Qt Concurrent C++ Classes
qhp.QtConcurrent.subprojects.classes.selectors = class fake:headerfile
qhp.QtConcurrent.subprojects.classes.sortPages = true
+qhp.QtConcurrent.subprojects.examples.title = Qt Concurrent Examples
+qhp.QtConcurrent.subprojects.examples.indexTitle = Qt Concurrent Examples
+qhp.QtConcurrent.subprojects.examples.selectors = fake:example
tagfile = ../../../doc/qtconcurrent/qtconcurrent.tags
-depends += qtcore qtdoc qmake qtcmake
+depends += qtcore qtnetwork qtdoc qmake qtcmake
headerdirs += ..
@@ -40,5 +43,5 @@ imagedirs += images
navigation.landingpage = "Qt Concurrent"
navigation.cppclassespage = "Qt Concurrent C++ Classes"
-# Fail the documentation build if there are more warnings than the limit
+# Enforce zero documentation warnings
warninglimit = 0
diff --git a/src/concurrent/doc/snippets/CMakeLists.txt b/src/concurrent/doc/snippets/CMakeLists.txt
index 1b0879a79f..03ebb75a2e 100644
--- a/src/concurrent/doc/snippets/CMakeLists.txt
+++ b/src/concurrent/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 Concurrent)
target_link_libraries(mytarget PRIVATE Qt6::Concurrent)
diff --git a/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrenttask.cpp b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrenttask.cpp
index ac3ca7fdfb..cb1889afb6 100644
--- a/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrenttask.cpp
+++ b/src/concurrent/doc/snippets/code/src_concurrent_qtconcurrenttask.cpp
@@ -30,7 +30,7 @@ std::is_invocable_v<std::decay_t<Task>, std::decay_t<Args>...>
//! [5]
QVariant value(42);
-auto result = QtConcurrent::task(&qvariant_cast<int>)
+auto result = QtConcurrent::task([](const QVariant &var){return qvariant_cast<int>(var);})
.withArguments(value)
.spawn()
.result(); // result == 42
diff --git a/src/concurrent/doc/src/qt6-changes.qdoc b/src/concurrent/doc/src/qt6-changes.qdoc
index cb0c606435..fa23ee21a7 100644
--- a/src/concurrent/doc/src/qt6-changes.qdoc
+++ b/src/concurrent/doc/src/qt6-changes.qdoc
@@ -5,7 +5,7 @@
\page concurrent-changes-qt6.html
\title Changes to Qt Concurrent
\ingroup changes-qt-5-to-6
- \brief Migrate Qt Concurrent to Qt 6.
+ \brief Improved to work with a variable number of arguments.
Qt 6 is a result of the conscious effort to make the framework more
efficient and easy to use.
diff --git a/src/concurrent/doc/src/qtconcurrent-examples.qdoc b/src/concurrent/doc/src/qtconcurrent-examples.qdoc
new file mode 100644
index 0000000000..06705cca1b
--- /dev/null
+++ b/src/concurrent/doc/src/qtconcurrent-examples.qdoc
@@ -0,0 +1,14 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \group qtconcurrentexamples
+ \title Qt Concurrent Examples
+ \brief Examples for the Qt Concurrent module
+ \ingroup all-examples
+ \ingroup qtconcurrent
+
+ The list of \l {Qt Concurrent} examples demonstrating how to use
+ Qt Concurrent API from C++.
+
+*/
diff --git a/src/concurrent/doc/src/qtconcurrent-index.qdoc b/src/concurrent/doc/src/qtconcurrent-index.qdoc
index 368f94fb69..5acf19e134 100644
--- a/src/concurrent/doc/src/qtconcurrent-index.qdoc
+++ b/src/concurrent/doc/src/qtconcurrent-index.qdoc
@@ -130,6 +130,12 @@
\include module-use.qdocinc building with qmake
\snippet snippets/snippets.pro qmake_use
+ \section1 Examples
+
+ \list
+ \li \l {Qt Concurrent Examples}
+ \endlist
+
\section1 Module Evolution
\l{Changes to Qt Concurrent} lists important changes in the module API
and functionality that were done for the Qt 6 series of Qt.