From 87583738f960e83918da3b66e455e75c144fbf8e Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Wed, 28 Sep 2016 19:27:11 +0300 Subject: moc: support nested q_namespaces Nested namespaces are quite common, therefore moc should support them. Task-number: QTBUG-55415 Change-Id: I756cab36d498eb4342b402d255836d5d30f07b30 Reviewed-by: Olivier Goffart (Woboq GmbH) --- tests/auto/tools/moc/tst_moc.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/auto/tools/moc/tst_moc.cpp') diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 601b1bb36b..ecf6c7e992 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -3777,6 +3777,10 @@ void tst_Moc::testQNamespace() QCOMPARE(meta.name(), "TestEnum1"); QCOMPARE(meta.enclosingMetaObject(), &TestQNamespace::staticMetaObject); QCOMPARE(meta.keyCount(), 2); + + QCOMPARE(FooNamespace::staticMetaObject.enumeratorCount(), 1); + QCOMPARE(FooNamespace::FooNestedNamespace::staticMetaObject.enumeratorCount(), 2); + QCOMPARE(FooNamespace::FooNestedNamespace::FooMoreNestedNamespace::staticMetaObject.enumeratorCount(), 1); } QTEST_MAIN(tst_Moc) -- cgit v1.2.3