summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist/lupdate/testdata
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-04 10:48:20 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-04 17:16:46 +0100
commit21f0f9157802f011bb02b96fd79057084039ae2b (patch)
treea218a432c5fb28a7029703657c112f152c6186df /tests/auto/linguist/lupdate/testdata
parentdf12ef0e1fa327103b09e9a817d83b8c8d3035d7 (diff)
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/lupdate/testdata')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/main.cpp19
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp2/project.ts.result8
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 d720b8ff52..7ddb68fbb1 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 ef5adb22c3..6f48e27021 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"/>