From: Roberto Raggi Date: Thu, 28 Jul 2011 11:20:49 +0000 (+0200) Subject: Remove deprecated QChar to ushort conversions. X-Git-Tag: qt-v5.0.0-alpha1~1814 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5304009fab75aee2c7a02412aaed17b03e88b806;p=profile%2Fivi%2Fqtdeclarative.git Remove deprecated QChar to ushort conversions. Change-Id: I2411d2221e70685d1a1518e2f5eb2e693261e00d Reviewed-on: http://codereview.qt.nokia.com/3775 Reviewed-by: Roberto Raggi Reviewed-by: Qt Sanity Bot --- diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp index e904ff6..b3530c0 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 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());