summaryrefslogtreecommitdiffstats
path: root/doc/src/internationalization
diff options
context:
space:
mode:
authorVenugopal Shivashankar <venugopal.shivashankar@digia.com>2012-12-14 14:15:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-17 12:27:54 +0100
commitd07fe3bf82adaee4e39d8ca50a45b96ef4ce7cec (patch)
tree8e8856fb8833f90692887636b0af67bb571ea865 /doc/src/internationalization
parent29649a7bbb64e3e91450fdb64477af3e79b61747 (diff)
Doc: Fixed qdoc errors and warnings
- Moved a couple of qdoc pages to qtcore as they were referring to \snippets in qtcore. - Replaced the deprecated \o with \li - Removed the unnecessary \generatelist command in the group pages. - Replaced a couple of \snippet instances with \code .. \endcode as the sources referred were outside the module boundaries. Change-Id: Ie978854edb4c611dbd5ac761e87463eb3589bb20 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Nico Vertriest <nico.vertriest@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'doc/src/internationalization')
-rw-r--r--doc/src/internationalization/i18n.qdoc20
1 files changed, 17 insertions, 3 deletions
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index 1e4308bf9..8a0c1ff3e 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -246,7 +246,10 @@
application, translators won't be able to override it. The
correct idiom is
- \snippet examples/mainwindows/application/mainwindow.cpp 20
+ \code
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcuts(QKeySequence::Quit);
+ \endcode
\section2 Use QString::arg() for Dynamic Text
@@ -565,7 +568,14 @@
For example, the following class definition includes the Q_OBJECT macro,
implementing a new tr() that uses the \c MainWindow context:
- \snippet mainwindows/sdi/mainwindow.h class definition with macro
+ \code
+ class MainWindow : public QMainWindow
+ {
+ Q_OBJECT
+
+ public:
+ MainWindow();
+ \endcode
\dots
If Q_OBJECT is not used in a class definition, the context will be
@@ -579,7 +589,11 @@
The following example shows how a translation is obtained for the
class shown in the previous section:
- \snippet mainwindows/sdi/mainwindow.cpp implicit tr context
+ \code
+ void MainWindow::createMenus()
+ {
+ fileMenu = menuBar()->addMenu(tr("&File"));
+ \endcode
\dots
Here, the translation context is \c MainWindow because it is the