summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-07-02 13:41:24 (GMT)
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-07-19 07:39:15 (GMT)
commit35645ce85bd0d48e8fd74b59898394e678ce1655 (patch)
tree8c79ec876480653ec48d5b8b0e7296561cf79652
parentb0fa702623fc8ed600c1c285a3fa5b80d29b5c0c (diff)
downloadqtx11extras-35645ce85bd0d48e8fd74b59898394e678ce1655.tar.gz
Doc: Mark a \snippet entry with a .pro file
This enables excluding the snippet from the documentation in some cases. In addition, moved the literal code blocks to a separate snippet file. Change-Id: I892bce6f249f67c06b5285244e0bf4f5701e7272 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--src/x11extras/doc/snippets/code/doc_src_qtx11extras.cpp57
-rw-r--r--src/x11extras/doc/src/qtx11extras-module.qdoc10
2 files changed, 61 insertions, 6 deletions
diff --git a/src/x11extras/doc/snippets/code/doc_src_qtx11extras.cpp b/src/x11extras/doc/snippets/code/doc_src_qtx11extras.cpp
new file mode 100644
index 0000000..bf6d801
--- /dev/null
+++ b/src/x11extras/doc/snippets/code/doc_src_qtx11extras.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 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$
+**
+****************************************************************************/
+
+//! [0]
+#include <QX11Info>
+//! [0]
+
+//! [1]
+QT += x11extras
+//! [1]
diff --git a/src/x11extras/doc/src/qtx11extras-module.qdoc b/src/x11extras/doc/src/qtx11extras-module.qdoc
index 8eaecab..cb7c7bd 100644
--- a/src/x11extras/doc/src/qtx11extras-module.qdoc
+++ b/src/x11extras/doc/src/qtx11extras-module.qdoc
@@ -36,14 +36,12 @@
To include the definitions of the module's classes, use the
following directive:
- \code
- #include <QX11Info>
- \endcode
+ \snippet code/doc_src_qtx11extras.cpp 0
+ \if !defined(qtforpython)
To link against the module, add this line to your \l {qmake Manual}{qmake} \c
.pro file:
- \code
- QT += x11extras
- \endcode
+ \snippet code/doc_src_qtx11extras.cpp 1
+ \endif
*/