diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-09-20 16:36:51 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-23 23:29:42 +0200 |
commit | e44f1dabe44f4979da5da7d5d50395883f3de684 (patch) | |
tree | fed290bdb7e900c5bf5855cb1dae7979ca14e6f1 /dist/changes-5.0.0 | |
parent | ef23f5d9bd3d82a6a1b5c3adb50d6ad4bfe127bb (diff) |
QTestLib: clean up qCompare specialisation/overload mix
qCompare() was both overloaded and specialised, but always as a template.
This lead to the QIcon specialisation actually invoking
qCompare(QFlags<void*>, ...)
when specifically asking for qCompare<void*>() (detected by adding
underlying-type detection to QFlags).
Fix by preferring overloading and not specialising anything.
Change-Id: Ie001ebb9dfb0847c6c33a3f45177a61579fd61ee
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'dist/changes-5.0.0')
-rw-r--r-- | dist/changes-5.0.0 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 1d594b6ce7..e02eb1919d 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -120,6 +120,18 @@ information about a particular change. like SkipSingle -- skipping a non-data-driven test function or skipping only the current data row of a data-driven test function. Every skipped data row is now reported in the test log. + * The qCompare() function template was both overloaded and specialised, which + made it almost impossible to specialise the correct primary template and + could lead to indecipherable error messages or surprising overload resolution + (such as going via qCompare(QFlags<void*>,int) to satisfy a request for + qCompare<void*>()). Now, specialisation has been replaced by overloading. + As a consquence, code such as qCompare<QString>(l, r) will no longer use the + QString-specific implementation and may fail to compile. We recommend you + replace specialisations with overloading, too. Also, don't pass explicit + template arguments to qCompare (e.g. qCompare<QString>(l, r)), but let + overload resolution pick the correct one, and cast arguments in case of + ambiguous overloads (e.g. qCompare(QString(l), r)). The resulting code will + continue to work against older QtTestlib versions. - The QSsl::TlsV1 enum value was renamed to QSsl::TlsV1_0 . |