aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qdeclarativejslexer.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2011-07-28 13:20:49 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-30 13:18:28 +0200
commit5304009fab75aee2c7a02412aaed17b03e88b806 (patch)
treeac5e4af78d37d9cd838963eb4865c8ee1a510493 /src/declarative/qml/parser/qdeclarativejslexer.cpp
parentae0c88ba3ea9d5a64854b4d93c925dbeb65752db (diff)
Remove deprecated QChar to ushort conversions.
Change-Id: I2411d2221e70685d1a1518e2f5eb2e693261e00d Reviewed-on: http://codereview.qt.nokia.com/3775 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejslexer.cpp')
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index e904ff6a37..b3530c0596 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -80,9 +80,9 @@ static unsigned char convertHex(ushort c)
return (c - 'A' + 10);
}
-static unsigned char convertHex(QChar c1, QChar c2)
+static QChar convertHex(QChar c1, QChar c2)
{
- return ((convertHex(c1.unicode()) << 4) + convertHex(c2.unicode()));
+ return QChar((convertHex(c1.unicode()) << 4) + convertHex(c2.unicode()));
}
static QChar convertUnicode(QChar c1, QChar c2, QChar c3, QChar c4)
@@ -622,7 +622,7 @@ again:
while (_char == QLatin1Char('\r'))
scanChar();
- if (_char == '\n') {
+ if (_char == QLatin1Char('\n')) {
u = _char;
scanChar();
} else {
@@ -710,7 +710,7 @@ again:
}
}
} else if (QDeclarativeUtils::isDigit(ch)) {
- if (ch != '0') {
+ if (ch != QLatin1Char('0')) {
int integer = ch.unicode() - '0';
QChar n = _char;
@@ -731,7 +731,7 @@ again:
QVarLengthArray<char,32> chars;
chars.append(ch.unicode());
- if (ch == QLatin1Char('0') && (_char == 'x' || _char == 'X')) {
+ if (ch == QLatin1Char('0') && (_char == QLatin1Char('x') || _char == QLatin1Char('X'))) {
// parse hex integer literal
chars.append(_char.unicode());