summaryrefslogtreecommitdiffstats
path: root/src/network/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/doc')
-rw-r--r--src/network/doc/qtnetwork.qdocconf2
-rw-r--r--src/network/doc/snippets/CMakeLists.txt12
-rw-r--r--src/network/doc/snippets/code/doc_src_qtnetwork.pro3
-rw-r--r--src/network/doc/snippets/network/tcpwait.cpp2
-rw-r--r--src/network/doc/snippets/snippets.pro2
-rw-r--r--src/network/doc/src/bearermanagement.qdoc2
-rw-r--r--src/network/doc/src/qtnetwork.qdoc30
7 files changed, 28 insertions, 25 deletions
diff --git a/src/network/doc/qtnetwork.qdocconf b/src/network/doc/qtnetwork.qdocconf
index 5465b1c0af..8c7f3fc912 100644
--- a/src/network/doc/qtnetwork.qdocconf
+++ b/src/network/doc/qtnetwork.qdocconf
@@ -27,7 +27,7 @@ qhp.QtNetwork.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtnetwork/qtnetwork.tags
-depends += qtcore qtgui qtdoc qmake
+depends += qtcore qtgui qtdoc qmake qtcmake
headerdirs += ..
diff --git a/src/network/doc/snippets/CMakeLists.txt b/src/network/doc/snippets/CMakeLists.txt
new file mode 100644
index 0000000000..a8030dd260
--- /dev/null
+++ b/src/network/doc/snippets/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 3.1.0)
+
+project(network_cppsnippets)
+
+add_executable(mytarget
+ network/tcpwait.cpp
+)
+
+# ![0]
+find_package(Qt5 COMPONENTS Network REQUIRED)
+target_link_libraries(mytarget Qt5::Network)
+# ![0]
diff --git a/src/network/doc/snippets/code/doc_src_qtnetwork.pro b/src/network/doc/snippets/code/doc_src_qtnetwork.pro
deleted file mode 100644
index a100943e58..0000000000
--- a/src/network/doc/snippets/code/doc_src_qtnetwork.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-#! [0]
-QT += network
-#! [0]
diff --git a/src/network/doc/snippets/network/tcpwait.cpp b/src/network/doc/snippets/network/tcpwait.cpp
index d57305930c..b81c5c1d53 100644
--- a/src/network/doc/snippets/network/tcpwait.cpp
+++ b/src/network/doc/snippets/network/tcpwait.cpp
@@ -48,7 +48,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QCoreApplication>
#include <QTcpSocket>
int main(int argv, char **args)
diff --git a/src/network/doc/snippets/snippets.pro b/src/network/doc/snippets/snippets.pro
index 39153e0c8e..bdf854e454 100644
--- a/src/network/doc/snippets/snippets.pro
+++ b/src/network/doc/snippets/snippets.pro
@@ -2,6 +2,8 @@ TEMPLATE = app
TARGET = network_cppsnippets
+# ![0]
QT += network
+# ![0]
SOURCES += network/tcpwait.cpp
diff --git a/src/network/doc/src/bearermanagement.qdoc b/src/network/doc/src/bearermanagement.qdoc
index f8d6a807d2..8aec894269 100644
--- a/src/network/doc/src/bearermanagement.qdoc
+++ b/src/network/doc/src/bearermanagement.qdoc
@@ -31,6 +31,8 @@
\title Bearer Management
\brief An API to control the system's connectivity state.
+\warning Bearer management is deprecated and will be removed in Qt 6.0.
+
Bearer Management controls the connectivity state of the system so that
the user can start or stop interfaces or roam transparently between
access points.
diff --git a/src/network/doc/src/qtnetwork.qdoc b/src/network/doc/src/qtnetwork.qdoc
index 85a3c198a0..57b0210b7f 100644
--- a/src/network/doc/src/qtnetwork.qdoc
+++ b/src/network/doc/src/qtnetwork.qdoc
@@ -34,19 +34,16 @@
TCP/IP. Operations such as requests, cookies, and sending data over HTTP
are handled by various C++ classes.
- \section1 Getting Started
+ \include module-use.qdocinc using qt module
+ \snippet CMakeLists.txt 0
- To use Qt Network classes,add this directive into the C++ files:
- \code
- #include <QtNetwork>
- \endcode
+ See also the \l{Build with CMake} overview.
- \if !defined(qtforpython)
- To link against the Qt Network module, add this line to the project file:
- \code
- QT += network
- \endcode
- \endif
+ \section2 Building with qmake
+
+ Add \c network to the \c QT variable:
+
+ \snippet snippets.pro 0
\section1 Articles and Guides
@@ -100,13 +97,6 @@
\qtvariable network
\brief Provides classes to make network programming easier and portable.
- To include the definitions of the module's classes, use the
- following directive:
-
- \snippet code/doc_src_qtnetwork.cpp 1
-
- To link against the module, add this line to your \l qmake \c
- .pro file:
-
- \snippet code/doc_src_qtnetwork.pro 0
+ Qt Network provides a set of APIs for programming applications that use
+ TCP/IP. See the \l{Qt Network} overview for more information.
*/