Expand QT_TR_NOOP("str") to "str", not ("str").
authorJan-Arve Saether <jan-arve.saether@nokia.com>
Fri, 21 Oct 2011 07:10:43 +0000 (09:10 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 21 Oct 2011 08:56:24 +0000 (10:56 +0200)
This enables us to write code like :
    QStringLiteral(QT_TR_NOOP("Press"))
or just:
    QT_UNICODE_LITERAL(QT_TR_NOOP("Press"))

It also makes it consistent with the QT_TRANSLATE_NOOP3,
QT_TRANSLATE_NOOP3_UTF8 and QT_TRID_NOOP macros, as they don't surround
the string literals with parenthesis.

Change-Id: I67c30bcd88609f897bd22afb44266affa4dcfc8f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
src/corelib/global/qglobal.h

index ee60185..29025d0 100644 (file)
@@ -2437,10 +2437,10 @@ template <typename Wrapper> static inline typename Wrapper::pointer qGetPtrHelpe
 #define Q_D(Class) Class##Private * const d = d_func()
 #define Q_Q(Class) Class * const q = q_func()
 
-#define QT_TR_NOOP(x) (x)
-#define QT_TR_NOOP_UTF8(x) (x)
-#define QT_TRANSLATE_NOOP(scope, x) (x)
-#define QT_TRANSLATE_NOOP_UTF8(scope, x) (x)
+#define QT_TR_NOOP(x) x
+#define QT_TR_NOOP_UTF8(x) x
+#define QT_TRANSLATE_NOOP(scope, x) x
+#define QT_TRANSLATE_NOOP_UTF8(scope, x) x
 #define QT_TRANSLATE_NOOP3(scope, x, comment) {x, comment}
 #define QT_TRANSLATE_NOOP3_UTF8(scope, x, comment) {x, comment}