diff options
author | Lucie Gérard <lucie.gerard@qt.io> | 2021-11-11 14:17:30 +0100 |
---|---|---|
committer | Lucie Gérard <lucie.gerard@qt.io> | 2021-11-18 18:13:21 +0100 |
commit | fb33e2a8e82cfc28cf3c3c4bad657e0400640cb2 (patch) | |
tree | cbd4056e6908a692ca6a942b353d0385b152b810 /src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp | |
parent | 4515c5e4fc17500cd42e19619ffb3bc6bee46425 (diff) |
Add missing QT_TRID_N_NOOP definition
Amends c74bd2b93, properly following up on qttools/bc47b5190.
[ChangeLog][QtCore] Added missing QT_TRID_N_NOOP() macro. Lupdate
actually recognizes it since Qt 5.12.
Fixes: QTBUG-98277
Fixes: QTBUG-3945
Change-Id: I0ea15ceb49b2ead5c8bb40d2a55a0ae8577e8850
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp index 55ce52a2e7..4d43226df9 100644 --- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp @@ -512,6 +512,20 @@ void TheClass::addLabels() } //! [qttrid_noop] +//! [qttrid_n_noop] +static const char * const ids[] = { + //% "%n foo(s) found." + QT_TRID_N_NOOP("qtn_foo"), + //% "%n bar(s) found." + QT_TRID_N_NOOP("qtn_bar"), + 0 +}; + +QString result(int type, int n) +{ + return qtTrId(ids[type], n); +} +//! [qttrid_n_noop] //! [37] qWarning("%s: %s", qUtf8Printable(key), qUtf8Printable(value)); |