summaryrefslogtreecommitdiff
path: root/src/qdoc/cppcodemarker.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2017-03-15 14:45:44 +0100
committerMartin Smith <martin.smith@qt.io>2017-08-10 07:35:06 +0000
commitf4569d8bb066a6220ed6c4556254a6da0623b674 (patch)
tree96c60e9e7df6a9fa62c33363f042085a069f1c9c /src/qdoc/cppcodemarker.cpp
parent853b1989f671061e1354233d78aae091fc2bfb6c (diff)
downloadqttools-f4569d8bb066a6220ed6c4556254a6da0623b674.tar.gz
qdoc: Fix signed vs unsigned comparisons
This fixes several cases where QChar was compared to -1. Change-Id: Ib7a0fec0f1e266ba47545296549e482592624ecc Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
-rw-r--r--src/qdoc/cppcodemarker.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp
index 387f2ac74..0f1137fa8 100644
--- a/src/qdoc/cppcodemarker.cpp
+++ b/src/qdoc/cppcodemarker.cpp
@@ -926,7 +926,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
readChar();
- while (ch != EOF) {
+ while (ch != QChar(EOF)) {
QString tag;
bool target = false;
@@ -985,7 +985,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
finish = i;
readChar();
- while (ch != EOF && ch != '"') {
+ while (ch != QChar(EOF) && ch != '"') {
if (ch == '\\')
readChar();
readChar();
@@ -997,7 +997,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
case '#':
finish = i;
readChar();
- while (ch != EOF && ch != '\n') {
+ while (ch != QChar(EOF) && ch != '\n') {
if (ch == '\\')
readChar();
finish = i;
@@ -1009,7 +1009,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
finish = i;
readChar();
- while (ch != EOF && ch != '\'') {
+ while (ch != QChar(EOF) && ch != '\'') {
if (ch == '\\')
readChar();
readChar();
@@ -1044,7 +1044,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
do {
finish = i;
readChar();
- } while (ch != EOF && ch != '\n');
+ } while (ch != QChar(EOF) && ch != '\n');
tag = QStringLiteral("comment");
} else if (ch == '*') {
bool metAster = false;
@@ -1054,7 +1054,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
readChar();
while (!metAsterSlash) {
- if (ch == EOF)
+ if (ch == QChar(EOF))
break;
if (ch == '*')