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