summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2020-05-22 09:49:16 +0200
committerKai Koehne <kai.koehne@qt.io>2020-05-26 15:11:41 +0200
commit4f59d94bf3aa804edde1d81fac412d8fbcc92115 (patch)
treee3f0086675386f93bed3927d4e873f05f51d9828 /src
parent9980ba5ba58b30933e951bd8c4f9807c42b978fd (diff)
Document how to use CMake for Qt Concurrent
Task-number: QTBUG-73058 Change-Id: I11398c5837b45ccacb9232609317213133ef20ea Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/concurrent/doc/qtconcurrent.qdocconf7
-rw-r--r--src/concurrent/doc/snippets/CMakeLists.txt4
-rw-r--r--src/concurrent/doc/snippets/snippets.pro3
-rw-r--r--src/concurrent/doc/src/qtconcurrent-index.qdoc10
4 files changed, 20 insertions, 4 deletions
diff --git a/src/concurrent/doc/qtconcurrent.qdocconf b/src/concurrent/doc/qtconcurrent.qdocconf
index 610dca2a7e..b60b3c1cd7 100644
--- a/src/concurrent/doc/qtconcurrent.qdocconf
+++ b/src/concurrent/doc/qtconcurrent.qdocconf
@@ -27,15 +27,16 @@ qhp.QtConcurrent.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtconcurrent/qtconcurrent.tags
-depends += qtcore qtdoc
+depends += qtcore qtdoc qmake qtcmake
headerdirs += ..
sourcedirs += ..
exampledirs += ../../../examples/qtconcurrent \
- ../ \
- snippets
+ snippets \
+ .. \
+ .
manifestmeta.highlighted.names = "QtConcurrent/QtConcurrent Progress Dialog Example"
diff --git a/src/concurrent/doc/snippets/CMakeLists.txt b/src/concurrent/doc/snippets/CMakeLists.txt
new file mode 100644
index 0000000000..a326efacb7
--- /dev/null
+++ b/src/concurrent/doc/snippets/CMakeLists.txt
@@ -0,0 +1,4 @@
+#! [cmake_use]
+find_package(Qt6 COMPONENTS Concurrent REQUIRED)
+target_link_libraries(mytarget Qt::Concurrent)
+#! [cmake_use]
diff --git a/src/concurrent/doc/snippets/snippets.pro b/src/concurrent/doc/snippets/snippets.pro
new file mode 100644
index 0000000000..6e99051951
--- /dev/null
+++ b/src/concurrent/doc/snippets/snippets.pro
@@ -0,0 +1,3 @@
+#! [qmake_use]
+QT += concurrent
+#! [qmake_use]
diff --git a/src/concurrent/doc/src/qtconcurrent-index.qdoc b/src/concurrent/doc/src/qtconcurrent-index.qdoc
index 973cf6c76d..4338977221 100644
--- a/src/concurrent/doc/src/qtconcurrent-index.qdoc
+++ b/src/concurrent/doc/src/qtconcurrent-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -31,6 +31,14 @@
\brief The Qt Concurrent module contains functionality to support concurrent execution of program code.
+ \include module-use.qdocinc using qt module
+ \snippet snippets/CMakeLists.txt cmake_use
+
+ See also the \l[QtDoc]{Building with CMake} overview.
+
+ \include module-use.qdocinc building with qmake
+ \snippet snippets/snippets.pro qmake_use
+
\section1 Getting Started
The QtConcurrent namespace provides high-level APIs that make it