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>
-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)
}
static QChar convertUnicode(QChar c1, QChar c2, QChar c3, QChar c4)
while (_char == QLatin1Char('\r'))
scanChar();
while (_char == QLatin1Char('\r'))
scanChar();
+ if (_char == QLatin1Char('\n')) {
u = _char;
scanChar();
} else {
u = _char;
scanChar();
} else {
}
}
} else if (QDeclarativeUtils::isDigit(ch)) {
}
}
} else if (QDeclarativeUtils::isDigit(ch)) {
+ if (ch != QLatin1Char('0')) {
int integer = ch.unicode() - '0';
QChar n = _char;
int integer = ch.unicode() - '0';
QChar n = _char;
QVarLengthArray<char,32> chars;
chars.append(ch.unicode());
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());
// parse hex integer literal
chars.append(_char.unicode());