diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-02-07 10:39:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-07 12:36:00 +0100 |
commit | 41dfd254c3a972fd77389713d0e370b98247a12d (patch) | |
tree | 06f4e97c5aded6a1a12b7f8d8b94e83fba7ef8ce /src/tools/qdoc/qmlparser | |
parent | 5221ae5f424f24000d877d2a4394e2d75a052cca (diff) |
qdoc: Fix translation contexts.
Put all translations into the namespace QDoc and fix warnings
about invalid tr()-usage by removing the free tr()-function
from tr.h. Provide QCoreApplication::translate() for bootstrap
builds.
Change-Id: I2b6931188346f290e80e14b84adff8892d8a860f
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/tools/qdoc/qmlparser')
-rw-r--r-- | src/tools/qdoc/qmlparser/qqmljslexer_p.h | 3 | ||||
-rw-r--r-- | src/tools/qdoc/qmlparser/qqmljsparser.cpp | 6 | ||||
-rw-r--r-- | src/tools/qdoc/qmlparser/qqmljsparser_p.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/tools/qdoc/qmlparser/qqmljslexer_p.h b/src/tools/qdoc/qmlparser/qqmljslexer_p.h index f22325ebf9..cb6ff6bcdf 100644 --- a/src/tools/qdoc/qmlparser/qqmljslexer_p.h +++ b/src/tools/qdoc/qmlparser/qqmljslexer_p.h @@ -55,6 +55,7 @@ #include "qqmljsglobal_p.h" #include "qqmljsgrammar_p.h" +#include "tr.h" #include <qstring.h> QT_QML_BEGIN_NAMESPACE @@ -87,6 +88,8 @@ public: class QML_PARSER_EXPORT Lexer: public QQmlJSGrammar { + Q_DECLARE_TR_FUNCTIONS(QDoc::QQmlJS::Lexer) + public: enum { T_ABSTRACT = T_RESERVED_WORD, diff --git a/src/tools/qdoc/qmlparser/qqmljsparser.cpp b/src/tools/qdoc/qmlparser/qqmljsparser.cpp index 104aa3d557..b7f571aa62 100644 --- a/src/tools/qdoc/qmlparser/qqmljsparser.cpp +++ b/src/tools/qdoc/qmlparser/qqmljsparser.cpp @@ -40,12 +40,6 @@ ****************************************************************************/ #include <qdebug.h> -#ifdef QT_BOOTSTRAPPED -#define tr(x, y) QString(QLatin1String(y)) -#else -#include <qcoreapplication.h> -#define tr(x, y) QCoreApplication::translate(x, y) -#endif #include <string.h> diff --git a/src/tools/qdoc/qmlparser/qqmljsparser_p.h b/src/tools/qdoc/qmlparser/qqmljsparser_p.h index e59ef67ffd..9fe7428bc2 100644 --- a/src/tools/qdoc/qmlparser/qqmljsparser_p.h +++ b/src/tools/qdoc/qmlparser/qqmljsparser_p.h @@ -75,6 +75,8 @@ class Engine; class QML_PARSER_EXPORT Parser: protected QQmlJSGrammar { + Q_DECLARE_TR_FUNCTIONS(QDoc::QQmlJS::Parser) + public: union Value { int ival; |