summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-06-14 12:18:38 +0200
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-06-21 11:13:27 +0000
commitbc8f1704fcbeb07fe88970521301c57f33d0ca5f (patch)
treeb273a2ec04171fd098ef8cc2ab6a7ae622855bc5 /src/multimedia
parent91bab737cbb1b50e89856a3061cbdb2d53af1e23 (diff)
Doc: Move the literal codeblocks to snippet files
Change-Id: Icd9dff16b807d0bc7143a3d41f9799432035fa54 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/doc/qtmultimedia.qdocconf3
-rw-r--r--src/multimedia/doc/snippets/doc_src_qtmultimedia.cpp53
-rw-r--r--src/multimedia/doc/snippets/doc_src_qtmultimedia.pro3
-rw-r--r--src/multimedia/doc/src/qtmultimedia-cpp.qdoc10
4 files changed, 68 insertions, 1 deletions
diff --git a/src/multimedia/doc/qtmultimedia.qdocconf b/src/multimedia/doc/qtmultimedia.qdocconf
index aa2aa4e3e..b547db762 100644
--- a/src/multimedia/doc/qtmultimedia.qdocconf
+++ b/src/multimedia/doc/qtmultimedia.qdocconf
@@ -44,7 +44,8 @@ qhp.QtMultimedia.subprojects.examples.selectors = doc:example
qhp.QtMultimedia.subprojects.examples.sortPages = true
exampledirs += ../../../examples \
- snippets
+ snippets \
+ ../../multimediawidgets/doc/snippets
manifestmeta.highlighted.names = "QtMultimedia/QML Video Shader Effects Example" \
"QtMultimedia/Media Player Example"
diff --git a/src/multimedia/doc/snippets/doc_src_qtmultimedia.cpp b/src/multimedia/doc/snippets/doc_src_qtmultimedia.cpp
new file mode 100644
index 000000000..a56283474
--- /dev/null
+++ b/src/multimedia/doc/snippets/doc_src_qtmultimedia.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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 <QtMultimedia>
+//! [0]
diff --git a/src/multimedia/doc/snippets/doc_src_qtmultimedia.pro b/src/multimedia/doc/snippets/doc_src_qtmultimedia.pro
new file mode 100644
index 000000000..13da13011
--- /dev/null
+++ b/src/multimedia/doc/snippets/doc_src_qtmultimedia.pro
@@ -0,0 +1,3 @@
+#! [0]
+QT += multimedia
+#! [0]
diff --git a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc
index a7b13bad4..053dd3de7 100644
--- a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc
+++ b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc
@@ -33,6 +33,16 @@
\brief The \l {Qt Multimedia} module provides audio, video, radio and camera
functionality.
+
+ To enable Qt Multimedia in a project, add this directive into the
+ C++ files:
+
+ \snippet doc_src_qtmultimedia.cpp 0
+
+ To link against the C++ libraries, add the following to your \c qmake project
+ file:
+
+ \snippet doc_src_qtmultimedia.pro 0
*/
/*!