QVariant: write less haphazardly to data
While the data subobject is at the same position in memory as the QVariant::Private, using d.data actually activates the union member. Change-Id: Ie6879b588c8e830ae8b34cfcd8e9ddff8b60b3a6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
dbab926883
commit
3f9d19b17b
@ -533,9 +533,9 @@ QVariant::QVariant(const QVariant &p)
|
||||
auto other = p.constData();
|
||||
if (iface) {
|
||||
if (other)
|
||||
iface->copyCtr(iface, &d, other);
|
||||
iface->copyCtr(iface, &d.data, other);
|
||||
else
|
||||
iface->defaultCtr(iface, &d);
|
||||
iface->defaultCtr(iface, &d.data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user