diff options
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r-- | src/tools/moc/moc.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index a6a0ba1..74ca1ad 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -654,8 +654,11 @@ void Moc::parse() case Q_CLASSINFO_TOKEN: parseClassInfo(&def); break; + case Q_CAST_INTERFACES_TOKEN: + parseInterfaces(&def, true); + break; case Q_INTERFACES_TOKEN: - parseInterfaces(&def); + parseInterfaces(&def, false); break; case Q_PRIVATE_SLOT_TOKEN: parseSlotInPrivate(&def, access); @@ -1025,12 +1028,12 @@ void Moc::parseClassInfo(ClassDef *def) def->classInfoList += infoDef; } -void Moc::parseInterfaces(ClassDef *def) +void Moc::parseInterfaces(ClassDef *def, bool isCast) { next(LPAREN); while (test(IDENTIFIER)) { QList<ClassDef::Interface> iface; - iface += ClassDef::Interface(lexem()); + iface += ClassDef::Interface(lexem(), isCast); while (test(SCOPE)) { iface.last().className += lexem(); next(IDENTIFIER); @@ -1038,7 +1041,7 @@ void Moc::parseInterfaces(ClassDef *def) } while (test(COLON)) { next(IDENTIFIER); - iface += ClassDef::Interface(lexem()); + iface += ClassDef::Interface(lexem(), isCast); while (test(SCOPE)) { iface.last().className += lexem(); next(IDENTIFIER); |