aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@digia.com>2013-04-15 11:56:21 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-15 12:15:02 +0200
commitcd7de65fbd83c0beaed31b24e82bbcef24d65bb5 (patch)
tree8e1eadc674339d0ade78b20410542452d6d0a017 /doc/src/snippets/code
parent0dc5db2f965f4aa64530a0f6b43ed9a7db922a45 (diff)
Doc: edit information about i18n
Make "Internationlization with Qt" about the classes that support i18n and move all other information to "Writing Source Code for Translation". Combine with information from the Qt Linguist Manual and remove redundancy. Change-Id: If7f4d7702ca7fcffcca262f33494867a028449d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'doc/src/snippets/code')
-rw-r--r--doc/src/snippets/code/doc_src_i18n.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/src/snippets/code/doc_src_i18n.cpp b/doc/src/snippets/code/doc_src_i18n.cpp
index f3256798b..48271271e 100644
--- a/doc/src/snippets/code/doc_src_i18n.cpp
+++ b/doc/src/snippets/code/doc_src_i18n.cpp
@@ -173,3 +173,19 @@ void MyWidget::changeEvent(QEvent *event)
QWidget::changeEvent(event);
}
//! [12]
+
+
+//! [13]
+void some_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ LoginWidget::tr("Password:"), logwid);
+}
+
+void same_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ qApp->translate("LoginWidget", "Password:"),
+ logwid);
+}
+//! [13]