diff options
Diffstat (limited to 'tools/qdoc3/tr.h')
-rw-r--r-- | tools/qdoc3/tr.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/qdoc3/tr.h b/tools/qdoc3/tr.h index 956fbc9..89b7ef4 100644 --- a/tools/qdoc3/tr.h +++ b/tools/qdoc3/tr.h @@ -46,14 +46,26 @@ #ifndef TR_H #define TR_H +#ifndef QT_BOOTSTRAPPED +# include "qcoreapplication.h" +#endif + #include <qstring.h> QT_BEGIN_NAMESPACE -inline QString tr( const char *sourceText, const char * /* comment */ = 0 ) +#if defined(QT_BOOTSTRAPPED) || defined(QT_NO_TRANSLATION) +inline QString tr(const char *sourceText, const char *comment = 0) { + Q_UNUSED(comment); return QString( QLatin1String(sourceText) ); } +#else +inline QString tr(const char *sourceText, const char *comment = 0) +{ + return QCoreApplication::instance()->translate("", sourceText, comment); +} +#endif QT_END_NAMESPACE |