diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-03-05 14:59:37 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-03-05 15:00:17 (GMT) |
commit | ddaa4643c1ee96c9dfc16b1c247481a240e2e16b (patch) | |
tree | 9036fd23c998af603f081fdebc81d42045ba4c22 /tests/auto | |
parent | 856f76e44a00a710b1c34eddee5a893a3c0ada6a (diff) | |
download | Qt-ddaa4643c1ee96c9dfc16b1c247481a240e2e16b.zip Qt-ddaa4643c1ee96c9dfc16b1c247481a240e2e16b.tar.gz Qt-ddaa4643c1ee96c9dfc16b1c247481a240e2e16b.tar.bz2 |
fix "using namespace" recursion crash
Task-number: QTBUG-8360
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp | 60 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result | 24 |
2 files changed, 84 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp index 42cc55b..a5b36ca 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp @@ -135,4 +135,64 @@ Q_OBJECT } }; +// QTBUG-8360 +namespace A { + +void foo() +{ + using namespace A; +} + +void goo() +{ + return QObject::tr("Bla"); +} + +} + + +namespace AA { +namespace B { + +using namespace AA; + +namespace C { + +class Test : public QObject { + Q_OBJECT +}; + +} + +} + +using namespace B; +using namespace C; + +void goo() +{ + AA::Test::tr("howdy?"); +} + +} + + +namespace A1 { +namespace B { + +class Test : public QObject { + Q_OBJECT +}; + +using namespace A1; + +void foo() +{ + B::B::B::Test::tr("yeeee-ha!"); +} + +} +} + + #include "main.moc" diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result index c1a34bd..94df9d3 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result @@ -2,6 +2,22 @@ <!DOCTYPE TS> <TS version="2.0"> <context> + <name>A1::B::Test</name> + <message> + <location filename="main.cpp" line="191"/> + <source>yeeee-ha!</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>AA::B::C::Test</name> + <message> + <location filename="main.cpp" line="174"/> + <source>howdy?</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>Class</name> <message> <location filename="main.cpp" line="52"/> @@ -79,4 +95,12 @@ <translation type="unfinished"></translation> </message> </context> +<context> + <name>QObject</name> + <message> + <location filename="main.cpp" line="148"/> + <source>Bla</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> |