qt5base-lts/tests/auto/dbus
Sami Rosendahl b9acd85b2f Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray extraction
QDBusArgument QByteArray extraction operator and QDBusDemarshaller that
implements the extraction do not check the type of the extracted value.
When extracting a QByteArray when the value actually is e.g. a struct of
mixed types the byte array extraction will crash as it attempts to extract
the struct data as a fixed array.

The fix adds DBus type checks to QDBusArgument byte array extraction
operator implementations.
The checks invalidate extracting arrays of other types than bytes to a
QByteArray that worked with the unchecked implementation. The rationale
for this restriction is
1) extracting a QByteArray to a variant checks already that the array
   element type is byte
2) Results of extracting arrays of types wider than a byte to a QByteArray
   are architecture-dependent making such code inherently non-portable.

Task-number: QTBUG-22840
Change-Id: Ie20f2adc06c697a68055c803215fb408568fdd90
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-25 21:58:57 +01:00
..
qdbusabstractadaptor all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusabstractinterface all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusconnection qtbase tests: Fix some warnings 2011-11-21 09:58:23 +01:00
qdbusconnection_no_bus all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbuscontext all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusinterface all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbuslocalcalls all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusmarshall Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray extraction 2011-12-25 21:58:57 +01:00
qdbusmetaobject all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusmetatype all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbuspendingcall Re-enabled passing test in tst_qdbuspendingcall 2011-11-04 08:36:13 +01:00
qdbuspendingreply all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusreply all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusservicewatcher all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusthreading qtbase tests: Fix some warnings 2011-11-21 09:58:23 +01:00
qdbustype all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
qdbusxmlparser all remaining tests: eliminated usage of qttest_p4.prf 2011-10-25 08:42:23 +02:00
dbus.pro Merge branch 'master' into refactor 2011-09-12 07:49:03 +02:00