summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r--src/tools/moc/moc.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index dbe75ebe51..f04f4c5d0d 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -261,11 +261,21 @@ bool Moc::parseEnum(EnumDef *def)
}
if (!test(LBRACE))
return false;
+ auto handleInclude = [this]() {
+ if (test(MOC_INCLUDE_BEGIN))
+ currentFilenames.push(symbol().unquotedLexem());
+ if (test(NOTOKEN)) {
+ next(MOC_INCLUDE_END);
+ currentFilenames.pop();
+ }
+ };
do {
if (lookup() == RBRACE) // accept trailing comma
break;
+ handleInclude();
next(IDENTIFIER);
def->values += lexem();
+ handleInclude();
skipCxxAttributes();
} while (test(EQ) ? until(COMMA) : test(COMMA));
next(RBRACE);