summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-02-14 14:44:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 11:55:51 +0100
commit5d6916b4c1f6ea3b86cc3d820c433fec8a42fad0 (patch)
tree0fef62059cf4074206ef3619716935089ca21ab9
parent73d32873cf307a60bbe83f2c9e973236bccb4162 (diff)
Doc: Removed reference to deprecated \badcode command.
-QDoc doesn't differentiate between \badcode and \code. They both look the same in the output. Change-Id: Ifabd51b7e433a1c30cf30c267d3ce63dded1bd43 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
-rw-r--r--src/corelib/doc/src/threads-basics.qdoc3
-rw-r--r--src/dbus/qdbusargument.cpp3
-rw-r--r--src/tools/qdoc/doc/qdoc-manual.qdoc81
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp3
4 files changed, 15 insertions, 75 deletions
diff --git a/src/corelib/doc/src/threads-basics.qdoc b/src/corelib/doc/src/threads-basics.qdoc
index dad41368c6..dd5267f0ba 100644
--- a/src/corelib/doc/src/threads-basics.qdoc
+++ b/src/corelib/doc/src/threads-basics.qdoc
@@ -269,7 +269,8 @@
This is the result of running the code:
- \badcode
+ \code
+ //bad code
hello from GUI thread 3079423696
hello from worker thread 3076111216
\endcode
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index 191eb5eea6..dab2daf90f 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -212,7 +212,8 @@ bool QDBusArgumentPrivate::checkReadAndDetach(QDBusArgumentPrivate *&d)
The following example illustrates this wrong usage
in context of a class that may contain invalid data:
- \badcode
+ \code
+ //bad code
// Wrongly marshall the MyTime data into a D-Bus argument
QDBusArgument &operator<<(QDBusArgument &argument, const MyTime &mytime)
{
diff --git a/src/tools/qdoc/doc/qdoc-manual.qdoc b/src/tools/qdoc/doc/qdoc-manual.qdoc
index 5254c46eb5..4d70faa968 100644
--- a/src/tools/qdoc/doc/qdoc-manual.qdoc
+++ b/src/tools/qdoc/doc/qdoc-manual.qdoc
@@ -243,7 +243,6 @@
\li \l {11-qdoc-commands-specialcontent.html#abstract-command} {\\abstract}
\li \l {12-0-qdoc-commands-miscellaneous.html#annotatedlist-command} {\\annotatedlist}
\li \l {04-qdoc-commands-textmarkup.html#b-command} {\\b} \span {class="newStuff"} {(new 5/3/2012)}
- \li \l {06-qdoc-commands-includecodeinline.html#badcode-command} {\\badcode}
\li \l {04-qdoc-commands-textmarkup.html#b-command} {\\bold} {(deprecated, use \\b)}
\li \l {11-qdoc-commands-specialcontent.html#brief-command} {\\brief}
\li \l {04-qdoc-commands-textmarkup.html#c-command} {\\c}
@@ -1175,8 +1174,7 @@
snippets. It renders the code verbatim in a separate paragraph in
the code font.
- When processing any of the \\code, \l {badcode-command}
- {\\badcode}, \l {newcode-command} {\\newcode} or \l
+ When processing any of the \\code, \l {newcode-command} {\\newcode} or \l
{oldcode-command} {\\oldcode} commands, QDoc removes all
indentation that is common for the verbatim code blocks within a
\c{/}\c{*!} ... \c{*}\c{/} comment before it adds the standard
@@ -1225,67 +1223,9 @@
See also \l {c-command} {\\c}, \l
{07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command}
- {\\quotefromfile}, \l {badcode-command} {\\badcode}, \l
- {newcode-command} {\\newcode} and \l {oldcode-command}
+ {\\quotefromfile}, \l{newcode-command} {\\newcode} and \l {oldcode-command}
{\\oldcode}.
- \target badcode-command
- \section1 \\badcode
-
- The \\badcode and \\endcode commands delimit a snippet of code
- that doesn't compile or is wrong for some other reason.
-
- The \\badcode command is similar to the \l {code-command} {\\code}
- command, but it renders the code snippet using a grey font instead
- of black.
-
- Like the \l {code-command} {\\code} command, this command begins
- its code snippet on a new line rendered in the code font and with
- the standard indentation.
-
- \code
- / *!
- The statement below is rendered using the
- regular \\code command:
-
- \code
- statusbar()->message(tr("Host %1 found").arg(hostName));
- \ endcode
-
- While the following statement is rendered using
- the \\badcode command:
-
- \badcode
- statusbar()->message(tr("Host" + hostName + " found"));
- \ endcode
- * /
- \endcode
-
- QDoc renders this as:
-
- \quotation
- The statement below is rendered using the
- regular \\code command:
-
- \code
- statusbar()->message(tr("Host %1 found").arg(hostName));
- \endcode
-
- While the following statement is rendered using
- the \\badcode command:
-
- \badcode
- statusbar()->message(tr("Host" + hostName + " found"));
- \endcode
- \endquotation
-
- Other QDoc commands are disabled within \\badcode... \\endcode,
- and the special character '\\' is accepted and rendered like the
- rest of the code.
-
- See also \l {code-command} {\\code}, \l {newcode-command}
- {\\newcode} and \l {oldcode-command} {\\oldcode}.
-
\target newcode-command
\section1 \\newcode
@@ -1293,14 +1233,12 @@
show how to port a snippet of code to a new version of an API.
The \\newcode command, and its companion the \\oldcode command, is
- a convenience combination of the \l {code-command} {\\code} and \l
- {badcode-command} {\\badcode} commands: The combination provides a
- text relating the two code snippets to each other. The command
- requires a preceding \\oldcode statement.
-
- Like the \l {code-command} {\\code} and \l {badcode-command}
- {\\badcode} commands, the \\newcode command renders its code on a
- new line in the documentation using a typewriter font and the
+ a convenience combination of the \l {code-command} {\\code} commands:
+ The combination provides a text relating the two code snippets to each
+ other. The command requires a preceding \\oldcode statement.
+
+ Like the \l{code-command}{\\code} command, the \\newcode command renders its
+ code on a new line in the documentation using a typewriter font and the
standard indentation.
\code
@@ -1339,7 +1277,7 @@
\\newcode statement; otherwise QDoc fails to parse the command
and emits a warning.
- See also \l {newcode-command} {\\newcode} and \l {badcode-command} {\\badcode}.
+ See also \l {newcode-command} {\\newcode}.
\target qml-command
\section1 \\qml
@@ -8688,7 +8626,6 @@
\li \l {12-0-qdoc-commands-miscellaneous.html#annotatedlist-command} {\\annotatedlist}
\li \l {04-qdoc-commands-textmarkup.html#b-command} {\\b} \span {class="newStuff"} {(new 5/3/2012)}
\li \l { 22-qdoc-configuration-generalvariables.html#basedir-variable} {basedir} \span {class="newStuff"} {(experimental)}
- \li \l {06-qdoc-commands-includecodeinline.html#badcode-command} {\\badcode}
\li \l {04-qdoc-commands-textmarkup.html#b-command} {\\bold} \span {class="newStuff"} {(deprecated, use \\b)}
\li \l {11-qdoc-commands-specialcontent.html#brief-command} {\\brief}
\li \l {04-qdoc-commands-textmarkup.html#c-command} {\\c}
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp
index 02b3cc7ba2..01ee2528f3 100644
--- a/src/widgets/widgets/qmdisubwindow.cpp
+++ b/src/widgets/widgets/qmdisubwindow.cpp
@@ -2236,7 +2236,8 @@ void QMdiSubWindowPrivate::updateInternalWindowTitle()
Note that only \l{QMdiSubWindow}s can be set as children of
QMdiArea; you cannot, for instance, write:
- \badcode
+ \code
+ //bad code
QMdiArea mdiArea;
QTextEdit editor(&mdiArea); // invalid child widget
\endcode