summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc/preprocessor.cpp')
-rw-r--r--src/tools/moc/preprocessor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index 14d1cd46dc..befc280f4e 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -188,7 +188,8 @@ Symbols Preprocessor::tokenize(const QByteArray& input, int lineNum, Preprocesso
token = keywords[state].ident;
if (token == NOTOKEN) {
- ++data;
+ if (*data)
+ ++data;
// an error really, but let's ignore this input
// to not confuse moc later. However in pre-processor
// only mode let's continue.
@@ -362,7 +363,6 @@ Symbols Preprocessor::tokenize(const QByteArray& input, int lineNum, Preprocesso
++data;
continue;
}
-
int nextindex = pp_keywords[state].next;
int next = 0;
if (*data == pp_keywords[state].defchar)
@@ -381,7 +381,8 @@ Symbols Preprocessor::tokenize(const QByteArray& input, int lineNum, Preprocesso
switch (token) {
case NOTOKEN:
- ++data;
+ if (*data)
+ ++data;
break;
case PP_DEFINE:
mode = PrepareDefine;
@@ -1252,7 +1253,6 @@ void Preprocessor::parseDefineArguments(Macro *m)
error("missing ')' in macro argument list");
break;
} else if (!is_identifier(l.constData(), l.length())) {
- qDebug() << l;
error("Unexpected character in macro argument list.");
}
}