summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-13 03:06:50 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-13 03:06:50 (GMT)
commit7aa4e177bbc01b7385cb345f3ad620a935dbe2d4 (patch)
treeb26c775d71e25e1a5f6abc70e810f71bab8f6fb5 /src/declarative/qml/parser
parent7a9dada31e570b2884c1c3c7a094ca9b1690c743 (diff)
downloadQt-7aa4e177bbc01b7385cb345f3ad620a935dbe2d4.zip
Qt-7aa4e177bbc01b7385cb345f3ad620a935dbe2d4.tar.gz
Qt-7aa4e177bbc01b7385cb345f3ad620a935dbe2d4.tar.bz2
i18n
Diffstat (limited to 'src/declarative/qml/parser')
-rw-r--r--src/declarative/qml/parser/qmljs.g2
-rw-r--r--src/declarative/qml/parser/qmljslexer.cpp20
-rw-r--r--src/declarative/qml/parser/qmljsparser.cpp2
3 files changed, 13 insertions, 11 deletions
diff --git a/src/declarative/qml/parser/qmljs.g b/src/declarative/qml/parser/qmljs.g
index ed6c272..eb9a8ab 100644
--- a/src/declarative/qml/parser/qmljs.g
+++ b/src/declarative/qml/parser/qmljs.g
@@ -142,7 +142,7 @@
****************************************************************************/
#include <QtCore/QtDebug>
-#include <QApplication>
+#include <QtGui/QApplication>
#include <string.h>
diff --git a/src/declarative/qml/parser/qmljslexer.cpp b/src/declarative/qml/parser/qmljslexer.cpp
index 54f8d78..2c03c21 100644
--- a/src/declarative/qml/parser/qmljslexer.cpp
+++ b/src/declarative/qml/parser/qmljslexer.cpp
@@ -48,6 +48,8 @@
#include "qmljslexer_p.h"
#include "qmljsgrammar_p.h"
+#include <QtGui/qapplication.h>
+
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
@@ -548,7 +550,7 @@ int Lexer::lex()
else {
setDone(Bad);
err = IllegalCharacter;
- errmsg = QLatin1String("Illegal character");
+ errmsg = qApp->translate("QmlParser", "Illegal character");
}
}
break;
@@ -562,7 +564,7 @@ int Lexer::lex()
} else if (current == 0 || isLineTerminator()) {
setDone(Bad);
err = UnclosedStringLiteral;
- errmsg = QLatin1String("Unclosed string at end of line");
+ errmsg = qApp->translate("QmlParser", "Unclosed string at end of line");
} else if (current == '\\') {
state = InEscapeSequence;
} else {
@@ -588,7 +590,7 @@ int Lexer::lex()
} else {
setDone(Bad);
err = IllegalEscapeSequence;
- errmsg = QLatin1String("Illegal escape squence");
+ errmsg = qApp->translate("QmlParser", "Illegal escape squence");
}
} else if (current == 'x')
state = InHexEscape;
@@ -634,7 +636,7 @@ int Lexer::lex()
} else {
setDone(Bad);
err = IllegalUnicodeEscapeSequence;
- errmsg = QLatin1String("Illegal unicode escape sequence");
+ errmsg = qApp->translate("QmlParser", "Illegal unicode escape sequence");
}
break;
case InSingleLineComment:
@@ -660,7 +662,7 @@ int Lexer::lex()
if (current == 0) {
setDone(Bad);
err = UnclosedComment;
- errmsg = QLatin1String("Unclosed comment at end of file");
+ errmsg = qApp->translate("QmlParser", "Unclosed comment at end of file");
driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
} else if (isLineTerminator()) {
shiftWindowsLineBreak();
@@ -747,7 +749,7 @@ int Lexer::lex()
} else {
setDone(Bad);
err = IllegalExponentIndicator;
- errmsg = QLatin1String("Illegal syntax for exponential number");
+ errmsg = qApp->translate("QmlParser", "Illegal syntax for exponential number");
}
break;
case InExponent:
@@ -773,7 +775,7 @@ int Lexer::lex()
&& isIdentLetter(current)) {
state = Bad;
err = IllegalIdentifier;
- errmsg = QLatin1String("Identifier cannot start with numeric literal");
+ errmsg = qApp->translate("QmlParser", "Identifier cannot start with numeric literal");
}
// terminate string
@@ -1104,7 +1106,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
while (1) {
if (isLineTerminator() || current == 0) {
- errmsg = QLatin1String("Unterminated regular expression literal");
+ errmsg = qApp->translate("QmlParser", "Unterminated regular expression literal");
return false;
}
else if (current != '/' || lastWasEscape == true)
@@ -1128,7 +1130,7 @@ bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
while (isIdentLetter(current)) {
int flag = Ecma::RegExp::flagFromChar(current);
if (flag == 0) {
- errmsg = QString::fromLatin1("Invalid regular expression flag '%0'")
+ errmsg = qApp->translate("QmlParser", "Invalid regular expression flag '%0'")
.arg(QChar(current));
return false;
}
diff --git a/src/declarative/qml/parser/qmljsparser.cpp b/src/declarative/qml/parser/qmljsparser.cpp
index 2c8162b..402aaeb 100644
--- a/src/declarative/qml/parser/qmljsparser.cpp
+++ b/src/declarative/qml/parser/qmljsparser.cpp
@@ -42,7 +42,7 @@
****************************************************************************/
#include <QtCore/QtDebug>
-#include <QApplication>
+#include <QtGui/QApplication>
#include <string.h>