[qt/qt/qtactiveqt]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/qt/qtactiveqt Pushed by mirror-service into branch '6.12'. Changed from b3e541dd653765ace07af9f891f7d2b66709cf08 to 694e92c88a9fb1887694abbba0b64106aa97465b Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit 7f386672b7632e459baa92b65cdd673f5534d252 by Qt Cherry-pick Bot (on behalf of Oliver Wolff) on 23/07/2026 at 13:22.. qaxbase: Make sure of null termination in sigs, propsigs and props maps In preparation for QT_ENABLE_STRICT_MODE. As the implicit conversion to char * is disabled in this mode, we have to make sure that everything behaves. Make sure that only null terminated byte arrays are entered into the QMaps. This might be overprotective but should not cost much. In doing so we can rely on constData whenever the values from these byte arrays are used for lookups as char arrays. The interface was changed because addSignal and addProperty are exclusively called using QByteArrays. Instead of hardening every calling site we now make sure that these byte arrays are null terminated inside the functions. Task-number: QTBUG-145279 Pick-to: 6.11 Change-Id: I337f888f9e24f293572e651a5fc9b8e1442474fd Reviewed-by: Marc Mutz <[email protected]> (cherry picked from commit e1adcf822355de7c4904dd8c487a07f29761371d) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtactiveqt/-/commit/7f386672b7632e459baa92b65cdd673f5534d252 Git commit 694e92c88a9fb1887694abbba0b64106aa97465b by Qt Cherry-pick Bot (on behalf of Luqiao Chen) on 23/07/2026 at 14:24.. ActiveQt: resolve enum parameter types by unqualified name Since dumpcpp started qualifying type names with the type library's namespace (commit 415da4185ffeaf6d1d773e7f390e417a75246ae9, "dumpcpp: Qualify type names"), a method or property parameter of a COM enum type is recorded in the meta object fully qualified, e.g. "MyTypeLib::MyEnum", while the enumerator itself is registered under its unqualified declared name "MyEnum". A COM enum has no C++ metatype, so QAxBase converts an enum argument to int only when QMetaObject::indexOfEnumerator() finds a matching enumerator. The exact-string lookup failed for the qualified name, so the argument was never packed into a VARIANT and IDispatch::Invoke rejected the call with a non-standard HRESULT, reported as "Error calling IDispatch member <name>: Unknown error". The byref output parameter was left unpopulated. Look the enumerator up by its exact name first and, if that misses, retry with the unqualified tail (after the last "::"), at both enum-lookup sites, in internalInvoke() and dynamicCallHelper(). That lookup, however, is not always reached: when dumpcpp hoists the enum to genuine namespace scope (as it does whenever the enum is declared in the type library itself), the qualified name also resolves to a real, distinct QMetaType via QMetaType::fromName(), and internalInvoke() used that unconditionally before ever consulting the meta object's enumerators. The resulting QVariant, wrapping the enum's own custom metatype instead of a plain int, then reached QVariantToVARIANT()'s generic fallback for custom types (id() >= QMetaType::User), which assumes any such type is a QAxObject-wrapping COM container and blindly reinterprets its raw storage as a QAxObject**, calling queryInterface() through it and crashing. Give the enumerator lookup precedence over QMetaType::fromName() in internalInvoke(), and make the QVariantToVARIANT() fallback recognize QMetaType::IsEnumeration and pack the value as a plain int instead of assuming a container, so a resolvable qualified enum type name can no longer bypass or break the enum handling. Add a regression test in tests/auto/qaxobjectcom that adds an enum to the in-process COM test server and round-trips a value through a dumpcpp- generated method, reproducing both failure modes. Fixes: QTBUG-148520 Pick-to: 6.11 Change-Id: I0a4473765120b6e76a95c98213bee3c41fd39b99 Reviewed-by: Volker Hilsheimer <[email protected]> (cherry picked from commit 0c753917886e801dc57c971b7950af267bfae4d9) Reviewed-by: Qt Cherry-pick Bot <[email protected]> https://invent.kde.org/qt/qt/qtactiveqt/-/commit/694e92c88a9fb1887694abbba0b64106aa97465b