diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-04 09:48:20 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-04 16:16:46 (GMT) |
commit | 21f0f9157802f011bb02b96fd79057084039ae2b (patch) | |
tree | a218a432c5fb28a7029703657c112f152c6186df /tests/auto/linguist | |
parent | df12ef0e1fa327103b09e9a817d83b8c8d3035d7 (diff) | |
download | Qt-21f0f9157802f011bb02b96fd79057084039ae2b.zip Qt-21f0f9157802f011bb02b96fd79057084039ae2b.tar.gz Qt-21f0f9157802f011bb02b96fd79057084039ae2b.tar.bz2 |
introduce delayed resolution of aliases
this has two effects:
- using-declarations which use forward-declared classes work without
collecting the forward declarations, as the resolution happens at a
place where the class definition must have been encountered already
- it should be a bit faster
Diffstat (limited to 'tests/auto/linguist')
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp | 19 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp index d720b8f..7ddb68f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp @@ -93,3 +93,22 @@ TopLevel2::Nested::foo() { TopLevel2::tr("TopLevel2"); } + + + +namespace NameSpace { +class ToBeUsed; +} + +// using statement before class definition +using NameSpace::ToBeUsed; + +class NameSpace::ToBeUsed { + Q_OBJECT + void caller(); +}; + +void ToBeUsed::caller() +{ + tr("NameSpace::ToBeUsed"); +} diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result index ef5adb2..6f48e27 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result @@ -2,6 +2,14 @@ <!DOCTYPE TS> <TS version="2.0"> <context> + <name>NameSpace::ToBeUsed</name> + <message> + <location filename="main.cpp" line="113"/> + <source>NameSpace::ToBeUsed</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>TopLevel</name> <message> <location filename="main.cpp" line="82"/> |