summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-03-19 23:21:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-20 23:28:21 +0100
commita45a80f322c4543a7de5c34ebcd4e8819b3cf0ce (patch)
treeb12714c4c742f1b2be2afbecdff534fb9da85cd3
parentecb20e57d4980320e4155ca03bc62dd8055feeb9 (diff)
Allow specification of a namespace for modules under test.
Change-Id: I957d662d677766732f324e48a6bc42f23f1a444c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-rw-r--r--src/corelib/Qt5CTestMacros.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake
index fd9ada874c..297a9e07f6 100644
--- a/src/corelib/Qt5CTestMacros.cmake
+++ b/src/corelib/Qt5CTestMacros.cmake
@@ -135,6 +135,11 @@ function(test_module_includes)
while(all_args)
list(GET all_args 0 qtmodule)
list(GET all_args 1 qtclass)
+ if (${qtclass}_NAMESPACE)
+ set(qtinstancetype ${${qtclass}_NAMESPACE}::${qtclass})
+ else()
+ set(qtinstancetype ${qtclass})
+ endif()
list(REMOVE_AT all_args 0 1)
set(includes_string
"${includes_string}
@@ -145,7 +150,7 @@ function(test_module_includes)
)
set(instances_string
"${instances_string}
- ${qtclass} local${qtclass};
+ ${qtinstancetype} local${qtclass};
")
endwhile()