summaryrefslogtreecommitdiffstats
path: root/doc/src/examples
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-03-31 13:54:58 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-03-31 13:54:58 (GMT)
commit37feac98c573a099502fddfb5703c2359711b4c4 (patch)
tree33d74f9650065de4564bc0d749ca50bd65b13a2c /doc/src/examples
parent7b18baf23b1e8c663872b2b25b1323798b1d09df (diff)
parentb764d3e6cb114988394e7500236ba087a3385a50 (diff)
downloadQt-37feac98c573a099502fddfb5703c2359711b4c4.zip
Qt-37feac98c573a099502fddfb5703c2359711b4c4.tar.gz
Qt-37feac98c573a099502fddfb5703c2359711b4c4.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
Diffstat (limited to 'doc/src/examples')
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc68
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo.qdocinc2
-rw-r--r--doc/src/examples/activeqt/hierarchy.qdoc4
-rw-r--r--doc/src/examples/arrowpad.qdoc2
-rw-r--r--doc/src/examples/containerextension.qdoc2
-rw-r--r--doc/src/examples/customwidgetplugin.qdoc2
-rw-r--r--doc/src/examples/editabletreemodel.qdoc4
-rw-r--r--doc/src/examples/fademessage.qdoc8
-rw-r--r--doc/src/examples/fancybrowser.qdoc4
-rw-r--r--doc/src/examples/globalVariables.qdoc61
-rw-r--r--doc/src/examples/icons.qdoc6
-rw-r--r--doc/src/examples/imageviewer.qdoc6
-rw-r--r--doc/src/examples/qml-examples.qdoc36
-rw-r--r--doc/src/examples/qtscriptcustomclass.qdoc12
-rw-r--r--doc/src/examples/rogue.qdoc4
-rw-r--r--doc/src/examples/simpledommodel.qdoc2
-rw-r--r--doc/src/examples/taskmenuextension.qdoc2
-rw-r--r--doc/src/examples/textfinder.qdoc2
-rw-r--r--doc/src/examples/trollprint.qdoc8
-rw-r--r--doc/src/examples/undoframework.qdoc3
-rw-r--r--doc/src/examples/worldtimeclockplugin.qdoc2
21 files changed, 136 insertions, 104 deletions
diff --git a/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
new file mode 100644
index 0000000..a36ebbb
--- /dev/null
+++ b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [script]
+<script language="javascript">
+function createSubWidget( form )
+{
+ ParentWidget.createSubWidget( form.nameEdit.value );
+}
+
+function renameSubWidget( form )
+{
+ var SubWidget = ParentWidget.subWidget( form.nameEdit.value );
+ if ( !SubWidget ) {
+ alert( "No such widget " + form.nameEdit.value + "!" );
+ return;
+ }
+ SubWidget.label = form.labelEdit.value;
+ form.nameEdit.value = SubWidget.label;
+}
+
+function setFont( form )
+{
+ ParentWidget.font = form.fontEdit.value;
+}
+</script>
+
+<p>
+This widget can have many children!
+</p>
+<object ID="ParentWidget" CLASSID="CLSID:d574a747-8016-46db-a07c-b2b4854ee75c"
+CODEBASE="http://qt.nokia.com/demos/hierarchy.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+<form>
+<input type="edit" ID="nameEdit" value="&lt;enter object name&gt;" />
+<input type="button" value="Create" onClick="createSubWidget(this.form)" />
+<input type="edit" ID="labelEdit" />
+<input type="button" value="Rename" onClick="renameSubWidget(this.form)" />
+<br />
+<input type="edit" ID="fontEdit" value="MS Sans Serif" />
+<input type="button" value = "Set Font" onClick="setFont(this.form)" />
+</form>
+//! [script]
diff --git a/doc/src/examples/activeqt/hierarchy-demo.qdocinc b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
index e7cb56e..86bfd87 100644
--- a/doc/src/examples/activeqt/hierarchy-demo.qdocinc
+++ b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
@@ -1,5 +1,4 @@
\raw HTML
-//! [0]
<script language="javascript">
function createSubWidget( form )
{
@@ -39,5 +38,4 @@ CODEBASE="http://qt.nokia.com/demos/hierarchy.cab">
<input type="edit" ID="fontEdit" value="MS Sans Serif" />
<input type="button" value = "Set Font" onClick="setFont(this.form)" />
</form>
-//! [0]
\endraw
diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc
index eb6cc71..791af1f 100644
--- a/doc/src/examples/activeqt/hierarchy.qdoc
+++ b/doc/src/examples/activeqt/hierarchy.qdoc
@@ -25,7 +25,7 @@
**
****************************************************************************/
-/*!
+/*!
\page qaxserver-demo-hierarchy.html
\title Qt Widget Hierarchy
@@ -84,5 +84,5 @@
your WebBrowser to support ActiveX controls, and scripting to be
enabled.
- \snippet examples/activeqt/hierarchy-demo.qdocinc 0
+ \snippet examples/activeqt/hierarchy-demo-snippet.qdoc script
*/
diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc
index bb22f83..5e9cc9a 100644
--- a/doc/src/examples/arrowpad.qdoc
+++ b/doc/src/examples/arrowpad.qdoc
@@ -66,7 +66,7 @@
context: it is the context of the texts in the \c ArrowPad class.
The \c Q_OBJECT macro defines \c tr(x) in \c ArrowPad like this:
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.cpp 0
Knowing which class each source text appears in enables \e {Qt
Linguist} to group texts that are logically related together, e.g.
diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc
index 818547c..57295de 100644
--- a/doc/src/examples/containerextension.qdoc
+++ b/doc/src/examples/containerextension.qdoc
@@ -138,7 +138,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_containerextension.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_containerextension.pro 0
The container extension is created as a library, and will be
installed alongside the other \QD plugins when the project is
diff --git a/doc/src/examples/customwidgetplugin.qdoc b/doc/src/examples/customwidgetplugin.qdoc
index f972500..5b6aab6 100644
--- a/doc/src/examples/customwidgetplugin.qdoc
+++ b/doc/src/examples/customwidgetplugin.qdoc
@@ -89,7 +89,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro 0
The custom widget is created as a library, and will be installed
alongside the other \QD plugins when the project is installed
diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc
index 042b745..5edc91b 100644
--- a/doc/src/examples/editabletreemodel.qdoc
+++ b/doc/src/examples/editabletreemodel.qdoc
@@ -131,14 +131,14 @@
In the case shown in the diagram, the piece of information represented
by \bold{a} can be obtained using the standard model/view API:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 0
Since each items holds pieces of data for each column in a given row,
there can be many model indexes that map to the same \c TreeItem object.
For example, the information represented by \bold{b} can be obtained
using the following code:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 1
The same underlying \c TreeItem would be accessed to obtain information
for the other model indexes in the same row as \bold{b}.
diff --git a/doc/src/examples/fademessage.qdoc b/doc/src/examples/fademessage.qdoc
index b8a09e8..09c1d94 100644
--- a/doc/src/examples/fademessage.qdoc
+++ b/doc/src/examples/fademessage.qdoc
@@ -29,13 +29,9 @@
\example effects/fademessage
\title Fade Message Effect Example
- \raw HTML
- <div style="text-align: center">
- \endraw
+ \div { style="text-align: center"}
\inlineimage fademessageeffect-example.png
\inlineimage fademessageeffect-example-faded.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
*/
diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc
index b46903d..bc30988 100644
--- a/doc/src/examples/fancybrowser.qdoc
+++ b/doc/src/examples/fancybrowser.qdoc
@@ -26,8 +26,8 @@
****************************************************************************/
/*!
- \example webkit/fancybrowser
- \title Fancy Browser Example
+ \example webkit/fancybrowser
+ \title Fancy Browser Example
The Fancy Browser example shows how to use jQuery with QtWebKit to
create a web browser with special effects and content
diff --git a/doc/src/examples/globalVariables.qdoc b/doc/src/examples/globalVariables.qdoc
index 4629801..224a3a7 100644
--- a/doc/src/examples/globalVariables.qdoc
+++ b/doc/src/examples/globalVariables.qdoc
@@ -101,48 +101,25 @@
The \c xmlpatterns command loads and parses \c globals.gccxml,
runs the XQuery \c reportGlobals.xq, and generates this report:
- \raw HTML
-<html xmlns="http://www.w3.org/1999/xhtml/" xml:lang="en" lang="en">
- <head>
- <title>Global variables report for globals.gccxml</title>
- </head>
- <style type="text/css">
- .details
- {
- text-align: left;
- font-size: 80%;
- color: blue
- }
- .variableName
- {
- font-family: courier;
- color: blue
- }
- </style>
- <body>
- <p class="details">Start report: 2008-12-16T13:43:49.65Z</p>
- <p>Global variables with complex types:</p>
- <ol>
- <li>
- <span class="variableName">mutableComplex1</span> in globals.cpp at line 14</li>
- <li>
- <span class="variableName">mutableComplex2</span> in globals.cpp at line 15</li>
- <li>
- <span class="variableName">constComplex1</span> in globals.cpp at line 16</li>
- <li>
- <span class="variableName">constComplex2</span> in globals.cpp at line 17</li>
- </ol>
- <p>Mutable global variables with primitives types:</p>
- <ol>
- <li>
- <span class="variableName">mutablePrimitive1</span> in globals.cpp at line 1</li>
- <li>
- <span class="variableName">mutablePrimitive2</span> in globals.cpp at line 2</li>
- </ol>
- <p class="details">End report: 2008-12-16T13:43:49.65Z</p>
- </body>
-</html>
- \endraw
+ \div {class="details"}
+ Start report: 2008-12-16T13:43:49.65Z
+ \enddiv
+
+ Global variables with complex types:
+ \list 1
+ \o \span {class="variableName"} {mutableComplex1} in globals.cpp at line 14
+ \o \span {class="variableName"} {mutableComplex2} in globals.cpp at line 15
+ \o \span {class="variableName"} {constComplex1} in globals.cpp at line 16
+ \o \span {class="variableName"} {constComplex2} in globals.cpp at line 17
+ \endlist
+
+ Mutable global variables with primitives types:
+ \list 1
+ \o \span {class="variableName"} {mutablePrimitive1} in globals.cpp at line 1
+ \o \span {class="variableName"} {mutablePrimitive2} in globals.cpp at line 2
+ \endlist
+
+ \div {class="details"} End report: 2008-12-16T13:43:49.65Z \enddiv
\section1 XQuery Code Walk-Through
diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc
index 4210859..3966bf4 100644
--- a/doc/src/examples/icons.qdoc
+++ b/doc/src/examples/icons.qdoc
@@ -147,8 +147,8 @@
render the other six mode/state combinations, QIcon uses the
search algorithm described in the table below:
- \table
- \header \o{2,1} Requested Pixmap \o{8,1} Preferred Alternatives (mode/state)
+ \table 100%
+ \header \o{2,1} Requested Pixmap \o {8,1} Preferred Alternatives (mode/state)
\header \o Mode \o State \o 1 \o 2 \o 3 \o 4 \o 5 \o 6 \o 7 \o 8
\row \o{1,2} Normal \o Off \o \bold N0 \o A0 \o N1 \o A1 \o D0 \o S0 \o D1 \o S1
\row \o On \o N1 \o \bold A1 \o N0 \o A0 \o D1 \o S1 \o D0 \o S0
@@ -278,7 +278,7 @@
If the application is built in debug mode, the \c Q_ASSERT()
macro will expand to
- \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_icons.cpp 0
In release mode, the macro simply disappear. The mode can be set
in the application's \c .pro file. One way to do so is to add an
diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc
index 70f71c8..f1d02c3 100644
--- a/doc/src/examples/imageviewer.qdoc
+++ b/doc/src/examples/imageviewer.qdoc
@@ -149,7 +149,7 @@
\{QWidget::adjustSize()}{adjustSize()} to achieve this, which is
essentially the same as
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 0
In the \c print() slot, we first make sure that an image has been
loaded into the application:
@@ -160,7 +160,7 @@
If the application is built in debug mode, the \c Q_ASSERT() macro
will expand to
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 1
In release mode, the macro simply disappear. The mode can be set
in the application's \c .pro file. One way to do so is to add an
@@ -318,7 +318,7 @@
Whenever we zoom in or out, we need to adjust the scroll bars in
consequence. It would have been tempting to simply call
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 4
but this would make the top-left corner the focal point, not the
center. Therefore we need to take into account the scroll bar
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 3439b09..68deae7 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -29,7 +29,7 @@
\title Animation: Basics Example
\example declarative/animation/basics
- This example shows how to create and combine \l{QML Animation}{animations} in QML.
+ This example shows how to create and combine \l{QML Animation and Transitions}{animations} in QML.
\table
\row
@@ -50,16 +50,16 @@
\title Animation: Behavior Examples
\example declarative/animation/behaviors
- This example shows how to use QML behaviors.
+ This example shows how to use QML behaviors.
\image qml-behaviors-example.png
*/
/*!
- \title Animation: Easing Example
+ \title Animation: Easing Example
\example declarative/animation/easing
- This example shows the different easing modes available for \l{QML Animation}{animations}.
+ This example shows the different easing modes available for \l{QML Animation and Transitions}{animations}.
\image qml-easing-example.png
*/
@@ -122,9 +122,9 @@
\page declarative-cppextensions-reference.html
\title C++ Extensions: Reference examples
- These examples show how QML can be extended from C++ in various ways.
-
- The code for these examples is used throughout the \l {Extending QML in C++} reference
+ These examples show how QML can be extended from C++ in various ways.
+
+ The code for these examples is used throughout the \l {Extending QML Functionalities using C++} reference
documentation, which highlights the main principles demonstrated in each example.
Furthermore, here are additional pages that discuss each example in detail:
@@ -160,7 +160,7 @@
\title LayoutItem Example
\example declarative/cppextensions/qgraphicslayouts/layoutitem
- This example show how to use the LayoutItem element to integrate QML items into an existing
+ This example show how to use the LayoutItem element to integrate QML items into an existing
\l{Graphics View Framework}{Graphics View}-based application.
\image qml-layoutitem-example.png
@@ -169,7 +169,7 @@
\title QGraphicsGridLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout
- This example shows how to use QGraphicsGridLayout to lay out QML items. This is
+ This example shows how to use QGraphicsGridLayout to lay out QML items. This is
useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with
QML.
@@ -179,10 +179,10 @@
\title QGraphicsLinearLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout
- This example shows how to use QGraphicsLinearLayout to lay out QML items. This is
+ This example shows how to use QGraphicsLinearLayout to lay out QML items. This is
useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with
QML.
-
+
\image qml-qgraphicslinearlayout-example.png
*/
/*!
@@ -198,7 +198,7 @@
\o \l{declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout}{QGraphicsLinearLayout}
\endlist
- Also see \l {Integrating QML with existing Qt UI code} for information on using QML
+ Also see \l {Integrating QML Code with Existing Qt UI Code} for information on using QML
in Qt applications that use the Graphics View framework or ordinary QWidget-based views.
*/
@@ -215,7 +215,7 @@
\title C++ Extensions: Image Provider Example
\example declarative/cppextensions/imageprovider
- This examples shows how to use QDeclarativeImageProvider to serve images
+ This examples shows how to use QDeclarativeImageProvider to serve images
to QML image elements.
\image qml-imageprovider-example.png
@@ -232,6 +232,7 @@
/*!
\title Internationalization Example
\example declarative/i18n
+ \ingroup internationalization
This example shows how to enable text translation in QML.
@@ -567,7 +568,7 @@
\example declarative/toys/clocks
This example displays a set of clocks with different times for different cities.
- Each clock is created by combining \l Image elements with \l Rotation transforms
+ Each clock is created by combining \l Image elements with \l Rotation transforms
and \l SpringAnimation behaviors.
\image qml-clocks-example.png
@@ -615,13 +616,6 @@
*/
/*!
- \title Touch Interaction: Gestures Example
- \example declarative/touchinteraction/gestures
-
- This example shows how to use the GestureArea element.
-*/
-
-/*!
\title Touch Interaction: MouseArea Example
\example declarative/touchinteraction/mousearea
diff --git a/doc/src/examples/qtscriptcustomclass.qdoc b/doc/src/examples/qtscriptcustomclass.qdoc
index f2b4f36..3ee6c95 100644
--- a/doc/src/examples/qtscriptcustomclass.qdoc
+++ b/doc/src/examples/qtscriptcustomclass.qdoc
@@ -46,7 +46,7 @@
scripting environment, \c{ByteArray} objects can be constructed like
so:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 0
\c{ByteArray} objects behave similar to normal \c{Array} objects. Every \c{ByteArray} object has
a \c{length} property, that holds the length of the array. If a new value is assigned to the \c{length}
@@ -55,22 +55,22 @@
Use normal array operations to read or write bytes in the array. The following code sets all the
bytes of an array to a certain value:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 1
When assigning a value to an array element, the value is truncated to eight bits:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 2
Like normal \c{Array} objects, if the array index is greater than the current length
of the array, the array is resized accordingly:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 3
Property names that aren't valid array indexes are treated
like normal object properties (again, the same is the case for normal \c{Array} objects);
in other words, it's perfectly fine to do something like this:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 4
The above assignment won't affect the contents of the array, but will rather assign a value
to the object property named "foo".
@@ -78,7 +78,7 @@
\c{ByteArray} objects have a set of methods: chop(), equals(), left(), mid(), toBase64() and so on.
These map directly onto the corresponding methods in QByteArray.
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 5
\section1 ByteArray Class Implementation
diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc
index 94539ad..4df0910 100644
--- a/doc/src/examples/rogue.qdoc
+++ b/doc/src/examples/rogue.qdoc
@@ -190,8 +190,8 @@
\snippet examples/statemachine/rogue/movementtransition.h 2
When \c onTransition() is invoked, we know that we have a
- \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, i.e., the event
- is already unwrapped.
+ \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, and can ask \c
+ Window to move the player.
\section1 The Roguelike Tradition
diff --git a/doc/src/examples/simpledommodel.qdoc b/doc/src/examples/simpledommodel.qdoc
index ea380bd..9b4d80e 100644
--- a/doc/src/examples/simpledommodel.qdoc
+++ b/doc/src/examples/simpledommodel.qdoc
@@ -53,7 +53,7 @@
snippet reads the contents of a file into a QDomDocument object and traverses the
document, reading all the plain text that can be found:
- \snippet doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_simpledommodel.cpp 0
In principle, the functions provided by QDomNode can be used to navigate from any
given starting point in a document to the piece of data requested by another component.
diff --git a/doc/src/examples/taskmenuextension.qdoc b/doc/src/examples/taskmenuextension.qdoc
index 0200c2f..b557b8b 100644
--- a/doc/src/examples/taskmenuextension.qdoc
+++ b/doc/src/examples/taskmenuextension.qdoc
@@ -139,7 +139,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_taskmenuextension.pro 0
The task menu extension is created as a library, and will be
installed alongside the other \QD plugins when the project is
diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc
index e92bb98..f5f41d7 100644
--- a/doc/src/examples/textfinder.qdoc
+++ b/doc/src/examples/textfinder.qdoc
@@ -70,7 +70,7 @@
QtUiTools module library. This is done in the \c{textfinder.pro} file
that contains the following lines:
- \snippet doc/src/snippets/code/doc_src_examples_textfinder.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_textfinder.pro 0
\section1 TextFinder Class Definition
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
index 3a77a71..a93811e 100644
--- a/doc/src/examples/trollprint.qdoc
+++ b/doc/src/examples/trollprint.qdoc
@@ -132,12 +132,12 @@
second argument "two-sided" in the appropriate \c tr() calls to the
first pair of radio buttons:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 0
and add the second argument "colors" in the appropriate \c tr() calls
for the second pair of radio buttons:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 1
Now run \c lupdate and open \c trollprint_pt.ts with \e {Qt Linguist}. You
should now see two changes.
@@ -177,7 +177,7 @@
the translations. This can be achieved by using a \c TRANSLATOR comment
in the source code:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 2
Try adding these comments to some source files, particularly to
dialog classes, describing the navigation necessary to reach the
@@ -192,7 +192,7 @@
correct. Comments that provide good navigation information can save
them time:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 3
\section1 Troll Print 1.1
diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc
index c5bc279..65104bd 100644
--- a/doc/src/examples/undoframework.qdoc
+++ b/doc/src/examples/undoframework.qdoc
@@ -199,8 +199,7 @@
\snippet examples/tools/undoframework/commands.cpp 8
- \c undo() removes the item from the scene. We need to update the
- scene as ...(ask Andreas)
+ \c undo() removes the item from the scene.
\snippet examples/tools/undoframework/commands.cpp 9
diff --git a/doc/src/examples/worldtimeclockplugin.qdoc b/doc/src/examples/worldtimeclockplugin.qdoc
index 61a214c..8a17004 100644
--- a/doc/src/examples/worldtimeclockplugin.qdoc
+++ b/doc/src/examples/worldtimeclockplugin.qdoc
@@ -176,7 +176,7 @@
is searched by \QD. We do this by specifying a target path for the project
and adding it to the list of items to install:
- \snippet doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro 0
The custom widget is created as a library, and will be installed
alongside the other \QD plugins when the project is installed