summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/linguist/lupdate/java.cpp16
-rw-r--r--src/linguist/lupdate/qdeclarative.cpp2
-rw-r--r--src/linguist/shared/ts.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/linguist/lupdate/java.cpp b/src/linguist/lupdate/java.cpp
index 40f5b9af1..670ca8ec9 100644
--- a/src/linguist/lupdate/java.cpp
+++ b/src/linguist/lupdate/java.cpp
@@ -108,11 +108,11 @@ std::ostream &yyMsg(int line = 0)
static QChar getChar()
{
if (yyInPos >= yyInStr.size())
- return EOF;
+ return QChar(EOF);
QChar c = yyInStr[yyInPos++];
- if (c.unicode() == '\n')
+ if (c == QLatin1Char('\n'))
++yyCurLineNo;
- return c.unicode();
+ return c;
}
static int getToken()
@@ -124,7 +124,7 @@ static int getToken()
yyComment.clear();
yyString.clear();
- while ( yyCh != EOF ) {
+ while (yyCh != QChar(EOF)) {
yyLineNo = yyCurLineNo;
if ( yyCh.isLetter() || yyCh.toLatin1() == '_' ) {
@@ -169,7 +169,7 @@ static int getToken()
if ( yyCh == QLatin1Char('/') ) {
do {
yyCh = getChar();
- if (yyCh == EOF)
+ if (yyCh == QChar(EOF))
break;
yyComment.append(yyCh);
} while (yyCh != QLatin1Char('\n'));
@@ -181,7 +181,7 @@ static int getToken()
while ( !metAsterSlash ) {
yyCh = getChar();
- if ( yyCh == EOF ) {
+ if (yyCh == QChar(EOF)) {
yyMsg() << qPrintable(LU::tr("Unterminated Java comment.\n"));
return Tok_Comment;
}
@@ -204,7 +204,7 @@ static int getToken()
case '"':
yyCh = getChar();
- while ( yyCh != EOF && yyCh != QLatin1Char('\n') && yyCh != QLatin1Char('"') ) {
+ while (yyCh != QChar(EOF) && yyCh != QLatin1Char('\n') && yyCh != QLatin1Char('"')) {
if ( yyCh == QLatin1Char('\\') ) {
yyCh = getChar();
if ( yyCh == QLatin1Char('u') ) {
@@ -257,7 +257,7 @@ static int getToken()
yyCh = getChar();
do {
yyCh = getChar();
- } while ( yyCh != EOF && yyCh != QLatin1Char('\'') );
+ } while (yyCh != QChar(EOF) && yyCh != QLatin1Char('\''));
yyCh = getChar();
break;
case '{':
diff --git a/src/linguist/lupdate/qdeclarative.cpp b/src/linguist/lupdate/qdeclarative.cpp
index ddf7d2f35..23e8dc451 100644
--- a/src/linguist/lupdate/qdeclarative.cpp
+++ b/src/linguist/lupdate/qdeclarative.cpp
@@ -290,7 +290,7 @@ QString createErrorString(const QString &filename, const QString &code, Parser &
for (int i = 0, end = qMin(column > 0 ? column - 1 : 0, textLine.length()); i < end; ++i) {
const QChar ch = textLine.at(i);
if (ch.isSpace())
- error += ch.unicode();
+ error += ch;
else
error += QLatin1Char(' ');
}
diff --git a/src/linguist/shared/ts.cpp b/src/linguist/shared/ts.cpp
index 153f9708b..8d394766a 100644
--- a/src/linguist/shared/ts.cpp
+++ b/src/linguist/shared/ts.cpp
@@ -464,7 +464,7 @@ static QString protect(const QString &str)
result += QLatin1String("&apos;");
break;
default:
- if ((c < 0x20 || (ch > 0x7f && ch.isSpace())) && c != '\n' && c != '\t')
+ if ((c < 0x20 || (ch > QChar(0x7f) && ch.isSpace())) && c != '\n' && c != '\t')
result += numericEntity(c);
else // this also covers surrogates
result += QChar(c);