Moc: don't stumple over inline namespace in more places
Ignore the 'inline' in case of nested namespace with another
nested inline namespace.
Amends 5222df2be7
Fixes: QTBUG-117765
Pick-to: 6.6 6.5
Change-Id: I87f2649606f63c818f225f8cc5ec914920763c5f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
905593a40b
commit
d39353085e
@ -706,8 +706,10 @@ void Moc::parse()
|
|||||||
switch (next()) {
|
switch (next()) {
|
||||||
case NAMESPACE:
|
case NAMESPACE:
|
||||||
if (test(IDENTIFIER)) {
|
if (test(IDENTIFIER)) {
|
||||||
while (test(SCOPE))
|
while (test(SCOPE)) {
|
||||||
|
test(INLINE); // ignore inline namespaces
|
||||||
next(IDENTIFIER);
|
next(IDENTIFIER);
|
||||||
|
}
|
||||||
if (test(EQ)) {
|
if (test(EQ)) {
|
||||||
// namespace Foo = Bar::Baz;
|
// namespace Foo = Bar::Baz;
|
||||||
until(SEMIC);
|
until(SEMIC);
|
||||||
|
@ -77,6 +77,9 @@ const char *string_hash_hash = STRING_HASH_HASH("baz");
|
|||||||
of writing this comment.
|
of writing this comment.
|
||||||
*/
|
*/
|
||||||
namespace A::inline B {}
|
namespace A::inline B {}
|
||||||
|
namespace A {
|
||||||
|
namespace B::inline C {}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(const QMetaObject*);
|
Q_DECLARE_METATYPE(const QMetaObject*);
|
||||||
|
Loading…
Reference in New Issue
Block a user