qt5base-lts/tests/auto/corelib/kernel
Olivier Goffart 45eba73492 Fix QVariant conversion to an enum type.
QVariant::canConvert<Enum> was returning true for everything can can be converted
to integer, but not for integer itself. That's because in QVariant::canConvert
we set the targetType to Int of it's an enum, but the Int->Int case was not
on the conversion matrix. So this commits adds it to the conversion matrix
and now QVariant::canConvert<Enum> returns consistently true for int itself.

But even tough canConvert returned true, it did not actualy do any conversion
to the enum type itself. Fix that by handling the case properlt in 'convert'

[ChangeLog][QtCore][QVariant] Fixed QVariant::canConvert and conversion from
integer types to enumeration types.

Task-number: QTBUG-53384
Change-Id: I6ac066f3900e31bfcea7af77836ddfc7730bd60b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-05-16 15:58:28 +00:00
..
qcoreapplication Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-02 16:59:55 +02:00
qeventdispatcher Blacklist and skip various tests that are flakey 2015-06-14 10:50:45 +00:00
qeventloop Stabilize qguieventloop test. 2015-09-24 07:36:25 +00:00
qmath Update copyright headers 2015-02-11 06:49:51 +00:00
qmetaenum Fix QtPrivate::IsQEnumHelper<void> 2015-05-17 09:13:18 +00:00
qmetamethod Update copyright headers 2015-02-11 06:49:51 +00:00
qmetaobject Output registered enums in qDebug operator for QFlags. 2015-02-26 12:16:51 +00:00
qmetaobjectbuilder Update copyright headers 2015-02-11 06:49:51 +00:00
qmetaproperty QMetaProperty::write should reset the property if an empty QVariant is given 2015-10-09 15:26:38 +00:00
qmetatype tst_QMetaType: fix misleading indention 2016-03-09 13:18:26 +00:00
qmimedata Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v). 2015-07-27 12:09:19 +00:00
qobject Don't copy the functor object for each signal emission 2016-04-13 09:35:13 +00:00
qpointer QPointer: add a test for const QPointer<X> 2016-04-01 18:57:25 +00:00
qsharedmemory Fix tests for platforms without process support 2016-03-01 09:27:13 +00:00
qsignalblocker Update copyright headers 2015-02-11 06:49:51 +00:00
qsignalmapper Update copyright headers 2015-02-11 06:49:51 +00:00
qsocketnotifier winrt: Disable tests which connect to localhost 2016-02-16 19:35:10 +00:00
qsystemsemaphore Skip instead of entirely excluding tests with disabled features 2015-03-16 09:34:15 +00:00
qtimer Fixed a QTimer::singleShot() crash when a functor callback is used 2015-10-12 16:45:04 +00:00
qtranslator Update testdata 2016-02-17 04:50:50 +00:00
qvariant Fix QVariant conversion to an enum type. 2016-05-16 15:58:28 +00:00
qwineventnotifier Update copyright headers 2015-02-11 06:49:51 +00:00
kernel.pro iOS: Skip tests that don't make sense or don't work on the platform 2015-03-16 14:25:27 +00:00