diff options
author | Jøger Hansegård <joger.hansegard@qt.io> | 2023-06-11 16:14:28 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-08-15 06:59:13 +0000 |
commit | f79c30ee8b4353cfe4d11eb1f6dcd8602be2f05a (patch) | |
tree | 77340b3456e66bedfe92006f99d16daedec4cec2 /examples/activeqt | |
parent | a3926343637a3feda2b762f60f3670a45b852ce9 (diff) |
Fix issues that caused ActiveQt qutlook sample to crash
The issues reported on qutlook sample appears to be caused by previous
hardening of the QVariant type, which now does not accept copying
uncopyable types.
The fix to this problem seems to be to be more consistent on use of
pointer types (which are copyable), vs value types generated by the
dumpcpp preprocessor.
In the function VARIANTToQVariant, we may end up in constructing a
wrapper object on top of an IDispatch interface. To be able to construct
an object, we need the value type of the wrapper object. Still, we
should pass it out as a pointer type. This change ensures that a pointer
type is returned if a pointer type was requested.
A second similar issue is fixed in QAxBase::internalInvoke, by passing
(what I assume is) the destination type into VARIANTToQVariant. This
prevents decaying pointer types into value types. I am not sure if this
is the right approach here, and it leaves the decay code behind, which
now might be unused.
Task-number: QTBUG-111191
Change-Id: I0331ee5e3f2dbeed2db45e152378c223feb6fc94
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit c92c897a700492878b767af7e10074e236b39f92)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/activeqt')
0 files changed, 0 insertions, 0 deletions