summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc')
-rw-r--r--src/tools/moc/preprocessor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
index fd8813ee88..40bba33d40 100644
--- a/src/tools/moc/preprocessor.cpp
+++ b/src/tools/moc/preprocessor.cpp
@@ -193,9 +193,12 @@ static Symbols tokenize(const QByteArray &input, int lineNum = 1, TokenizeMode m
token = keywords[state].ident;
if (token == NOTOKEN) {
- // an error really
++data;
- continue;
+ // an error really, but let's ignore this input
+ // to not confuse moc later. However in pre-processor
+ // only mode let's continue.
+ if (!Preprocessor::preprocessOnly)
+ continue;
}
++column;