From a45a80f322c4543a7de5c34ebcd4e8819b3cf0ce Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 19 Mar 2013 23:21:08 +0100 Subject: Allow specification of a namespace for modules under test. Change-Id: I957d662d677766732f324e48a6bc42f23f1a444c Reviewed-by: Oswald Buddenhagen Reviewed-by: Stephen Kelly --- src/corelib/Qt5CTestMacros.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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() -- cgit v1.2.3