diff options
-rw-r--r-- | src/tools/moc/moc.cpp | 3 | ||||
-rw-r--r-- | tests/auto/tools/moc/namespace.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index b9f71ddb15..61a5542c83 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -674,6 +674,9 @@ void Moc::parse() if (test(NAMESPACE)) { while (test(SCOPE) || test(IDENTIFIER)) ; + // Ignore invalid code such as: 'using namespace __identifier("x")' (QTBUG-63772) + if (test(LPAREN)) + until(RPAREN); next(SEMIC); } break; diff --git a/tests/auto/tools/moc/namespace.h b/tests/auto/tools/moc/namespace.h index 43d00e82f3..7f1e46cd62 100644 --- a/tests/auto/tools/moc/namespace.h +++ b/tests/auto/tools/moc/namespace.h @@ -76,6 +76,7 @@ namespace FooNamespace { #ifdef Q_MOC_RUN namespace __identifier("<AtlImplementationDetails>") {} // QTBUG-56634 +using namespace __identifier("<AtlImplementationDetails>"); // QTBUG-63772 #endif #endif // NAMESPACE_H |