From c61f8df4047a616ffcb5e775fa8e5981b13e193f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 17 Dec 2014 12:58:31 +0100 Subject: [PATCH] QtTest: call toString() as a normal function toString() is both a function template and a set of overloaded functions (for const char* and const void*). So don't explicitly specify the function template arguments (they're deduced from the arguments anyway). This enables overloading toString() as well as specializing the template. [ChangeLog][QtTest][Important Behavior Changes] toString() can now be overloaded (instead of just specialized) for custom types, and is now reliably found through argument-dependent lookup (ADL). Change-Id: Ic4a622d236ad7f0e4142835353f1b98bf2dc6d4c Reviewed-by: Thiago Macieira --- src/testlib/qtestcase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index c1c1559183..8d767e39fc 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -282,7 +282,7 @@ namespace QTest const char *file, int line) { return compare_helper(t1 == t2, "Compared values are not the same", - toString(t1), toString(t2), actual, expected, file, line); + toString(t1), toString(t2), actual, expected, file, line); } Q_TESTLIB_EXPORT bool qCompare(float const &t1, float const &t2,