Doc: Check before including the \snippet from a .pro file

Change-Id: Icc7552b46a2657c81958e40f33596ddeee045172
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
Venugopal Shivashankar 2018-06-28 14:55:06 +02:00
parent bd42e2f0ce
commit 059b10f295
13 changed files with 29 additions and 1 deletions

View File

@ -51,6 +51,7 @@
\snippet code/doc_src_qtdbus.cpp 0 \snippet code/doc_src_qtdbus.cpp 0
\if !defined(qtforpython)
If you're using qmake to build your application, you can add this If you're using qmake to build your application, you can add this
line to your .pro file to make it link against the Qt D-Bus line to your .pro file to make it link against the Qt D-Bus
libraries: libraries:
@ -60,6 +61,7 @@
\note The source code for this module is located in the \c{src/qdbus} \note The source code for this module is located in the \c{src/qdbus}
directory. When installing Qt from source, this module is built when Qt's directory. When installing Qt from source, this module is built when Qt's
tools are built. tools are built.
\endif
See the \l {Qt D-Bus}{D-Bus} page for detailed information on See the \l {Qt D-Bus}{D-Bus} page for detailed information on
how to use this module. how to use this module.

View File

@ -46,11 +46,12 @@
\snippet code/doc_src_qtgui.pro 0 \snippet code/doc_src_qtgui.pro 0
\if !defined(qtforpython)
If you use \l qmake to build your projects, \l{Qt GUI} is included by If you use \l qmake to build your projects, \l{Qt GUI} is included by
default. To disable Qt GUI, add the following line to your \c .pro file: default. To disable Qt GUI, add the following line to your \c .pro file:
\snippet code/doc_src_qtgui.pro 1 \snippet code/doc_src_qtgui.pro 1
\endif
*/ */
/*! /*!
@ -75,10 +76,12 @@
\snippet code/doc_src_qtgui.pro 0 \snippet code/doc_src_qtgui.pro 0
\if !defined(qtforpython)
If you use \l qmake to build your projects, Qt GUI is included by If you use \l qmake to build your projects, Qt GUI is included by
default. To disable Qt GUI, add the following line to your \c .pro file: default. To disable Qt GUI, add the following line to your \c .pro file:
\snippet code/doc_src_qtgui.pro 1 \snippet code/doc_src_qtgui.pro 1
\endif
\section1 Application Windows \section1 Application Windows

View File

@ -40,10 +40,13 @@
\code \code
#include <QtNetwork> #include <QtNetwork>
\endcode \endcode
\if !defined(qtforpython)
To link against the Qt Network module, add this line to the project file: To link against the Qt Network module, add this line to the project file:
\code \code
QT += network QT += network
\endcode \endcode
\endif
\section1 Articles and Guides \section1 Articles and Guides

View File

@ -51,10 +51,12 @@
\snippet code/doc_src_qtopengl.cpp 0 \snippet code/doc_src_qtopengl.cpp 0
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qtopengl.pro 1 \snippet code/doc_src_qtopengl.pro 1
\endif
The Qt OpenGL module is implemented as a platform-independent Qt/C++ The Qt OpenGL module is implemented as a platform-independent Qt/C++
wrapper around the platform-dependent GLX (version 1.3 or later), wrapper around the platform-dependent GLX (version 1.3 or later),

View File

@ -57,10 +57,12 @@
\snippet code/doc_src_qtopengl.cpp 0 \snippet code/doc_src_qtopengl.cpp 0
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qtopengl.pro 1 \snippet code/doc_src_qtopengl.pro 1
\endif
The Qt OpenGL module is implemented as a platform-independent Qt/C++ The Qt OpenGL module is implemented as a platform-independent Qt/C++
wrapper around the platform-dependent GLX (version 1.3 or later), wrapper around the platform-dependent GLX (version 1.3 or later),

View File

@ -38,8 +38,10 @@
\snippet code/doc_src_qtprintsupport.cpp 1 \snippet code/doc_src_qtprintsupport.cpp 1
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qtprintsupport.pro 0 \snippet code/doc_src_qtprintsupport.pro 0
\endif
*/ */

View File

@ -87,10 +87,12 @@
\snippet code/doc_src_qtsql.cpp 0 \snippet code/doc_src_qtsql.cpp 0
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qtsql.pro 1 \snippet code/doc_src_qtsql.pro 1
\endif
See the \l{SQL Programming} guide for information about using this See the \l{SQL Programming} guide for information about using this
module in your applications. module in your applications.

View File

@ -41,9 +41,11 @@
\snippet code/doc_src_qttest.cpp 0 \snippet code/doc_src_qttest.cpp 0
\if !define(qtforpython)
To link against Qt Test, add this line to the project file: To link against Qt Test, add this line to the project file:
\snippet code/doc_src_qttest.pro 1 \snippet code/doc_src_qttest.pro 1
\endif
\section1 Articles and Guides \section1 Articles and Guides

View File

@ -42,10 +42,12 @@
\snippet code/doc_src_qttest.cpp 0 \snippet code/doc_src_qttest.cpp 0
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qttest.pro 1 \snippet code/doc_src_qttest.pro 1
\endif
See \l{Qt Test Overview} for an introduction on how to use See \l{Qt Test Overview} for an introduction on how to use
Qt's unit testing features with your applications. Qt's unit testing features with your applications.

View File

@ -109,6 +109,7 @@
For more examples, refer to the \l{Qt Test Tutorial}. For more examples, refer to the \l{Qt Test Tutorial}.
\if !defined(qtforpython)
\section1 Building a Test \section1 Building a Test
If you are using \c qmake as your build tool, just add the If you are using \c qmake as your build tool, just add the
@ -132,6 +133,7 @@
See \l {Chapter 1: Writing a Unit Test}{Writing a Unit Test} for a step by See \l {Chapter 1: Writing a Unit Test}{Writing a Unit Test} for a step by
step explanation. step explanation.
\endif
\section1 Qt Test Command Line Arguments \section1 Qt Test Command Line Arguments

View File

@ -38,9 +38,11 @@
\snippet code/doc_src_qtwidgets.cpp 1 \snippet code/doc_src_qtwidgets.cpp 1
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qtwidgets.pro 0 \snippet code/doc_src_qtwidgets.pro 0
\endif
*/ */

View File

@ -38,10 +38,12 @@
\snippet code/doc_src_qtxml.cpp 0 \snippet code/doc_src_qtxml.cpp 0
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qtxml.pro 1 \snippet code/doc_src_qtxml.pro 1
\endif
The \l{Qt XML C++ Classes} page gives an overview over the available classes The \l{Qt XML C++ Classes} page gives an overview over the available classes
in this module. in this module.

View File

@ -41,8 +41,10 @@
\snippet code/doc_src_qtxml.cpp 0 \snippet code/doc_src_qtxml.cpp 0
\if !defined(qtforpython)
To link against the module, add this line to your \l qmake \c To link against the module, add this line to your \l qmake \c
.pro file: .pro file:
\snippet code/doc_src_qtxml.pro 1 \snippet code/doc_src_qtxml.pro 1
\endif
*/ */