diff options
author | Mateusz Starzycki <mstarzycki@gmail.com> | 2016-06-28 22:09:14 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-05-15 10:05:09 +0000 |
commit | c74bd2b9364ad2619eae5e72496b2ab7bb6041b8 (patch) | |
tree | b21968aa65fb9fee786c5ba457fcfce3ed024198 /src/corelib/global/qglobal.h | |
parent | 878a82f188f29db57cac0d02ae9ca32e3d660916 (diff) |
Add QT_TR*_N_NOOP() macros
[ChangeLog][QtCore][Global] Added the QT_TR_N_NOOP(),
QT_TRANSLATE_N_NOOP(), and QT_TRANSLATE_N_NOOP3() macros for numeral
dependent delayed translation.
Change-Id: I57c5b1ad4006267f49a57b0cbc40216b8e0399ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index f86b62d56a..b608489576 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1064,6 +1064,10 @@ template <typename Ptr> inline auto qGetPtrHelper(const Ptr &ptr) -> decltype(pt #ifndef QT_NO_TRANSLATION // ### Qt6: This should enclose the NOOPs above +#define QT_TR_N_NOOP(x) x +#define QT_TRANSLATE_N_NOOP(scope, x) x +#define QT_TRANSLATE_N_NOOP3(scope, x, comment) {x, comment} + // Defined in qcoreapplication.cpp // The better name qTrId() is reserved for an upcoming function which would // return a much more powerful QStringFormatter instead of a QString. |