diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-09-08 12:46:40 (GMT) |
---|---|---|
committer | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-09-08 12:46:40 (GMT) |
commit | 80966f5ac941092e25643b5f80a410e61c26f8bc (patch) | |
tree | 3b0ddc7e27e4d418003ae67304723323e46198b2 /tools | |
parent | 220048de8130bbe6059af0a05c7328ae0048bf42 (diff) | |
download | Qt-80966f5ac941092e25643b5f80a410e61c26f8bc.zip Qt-80966f5ac941092e25643b5f80a410e61c26f8bc.tar.gz Qt-80966f5ac941092e25643b5f80a410e61c26f8bc.tar.bz2 |
Migrate addMarkUp function to QChar.
Reviewed-by: Martin Smith
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/cppcodemarker.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 9af7b9e..b81e979 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -937,7 +937,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, int i = 0; int start = 0; int finish = 0; - char ch; + QChar ch; QRegExp classRegExp("Qt?(?:[A-Z3]+[a-z][A-Za-z]*|t)"); QRegExp functionRegExp("q([A-Z][a-z]+)+"); @@ -947,13 +947,13 @@ QString CppCodeMarker::addMarkUp(const QString &in, QString tag; bool target = false; - if (isalpha((unsigned char) ch) || ch == '_') { + if (ch.isLetter() || ch == '_') { QString ident; do { - ident += ch; - finish = i; - readChar(); - } while (isalnum((unsigned char) ch) || ch == '_'); + ident += ch; + finish = i; + readChar(); + } while (ch.isLetterOrNumber() || ch == '_'); if (classRegExp.exactMatch(ident)) { tag = QLatin1String("type"); @@ -970,14 +970,14 @@ QString CppCodeMarker::addMarkUp(const QString &in, tag = QLatin1String("func"); target = true; } - } else if (isdigit((unsigned char) ch)) { + } else if (ch.isDigit()) { do { finish = i; readChar(); - } while (isalnum((unsigned char) ch) || ch == '.'); + } while (ch.isLetterOrNumber() || ch == '.'); tag = QLatin1String("number"); } else { - switch (ch) { + switch (ch.unicode()) { case '+': case '-': case '!': |