diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-12-17 12:58:31 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-01-04 09:43:04 +0100 |
commit | c61f8df4047a616ffcb5e775fa8e5981b13e193f (patch) | |
tree | 459a5526b417a1195578f4837f3b503a4194042e | |
parent | 876c2164f43a54fc4b98184a2f016526383524c6 (diff) |
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 <thiago.macieira@intel.com>
-rw-r--r-- | src/testlib/qtestcase.h | 2 |
1 files changed, 1 insertions, 1 deletions
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<T>(t1), toString<T>(t2), actual, expected, file, line); + toString(t1), toString(t2), actual, expected, file, line); } Q_TESTLIB_EXPORT bool qCompare(float const &t1, float const &t2, |