From 974bead30f32a832180126944973c82f5bc6f6e2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 21 Jan 2020 08:45:20 +0100 Subject: Workaround for Application.WordBasic.DisableAutoMacros not working Invoke() only works for this method when pVarResult is 0. Fix as contributed on report. Fixes: QTBUG-81543 Change-Id: I8163bccc9c69ef9c5bffb5270d2779e94e587c7e Reviewed-by: Volker Hilsheimer --- src/activeqt/container/qaxbase.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 1262944..cdaef30 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -4021,6 +4021,12 @@ bool QAxBase::dynamicCallHelper(const char *name, void *inout, QList & UINT argerr = 0; HRESULT hres = Invoke(disp, dispid, IID_NULL, LOCALE_USER_DEFAULT, disptype, ¶ms, res, &excepinfo, &argerr); + if (hres == DISP_E_MEMBERNOTFOUND && (disptype & DISPATCH_METHOD) != 0) { + // Retry with pVarResult = 0, workaround for "Word.Application.WordBasic.DisableAutoMacros(bool)" + memset(&excepinfo, 0, sizeof(excepinfo)); + argerr = 0; + hres = Invoke(disp, dispid, IID_NULL, LOCALE_USER_DEFAULT, disptype, ¶ms, nullptr, &excepinfo, &argerr); + } if (disptype == (DISPATCH_METHOD|DISPATCH_PROPERTYGET) && hres == S_OK && varc) { for (int i = 0; i < varc; ++i) -- cgit v1.2.3 From 6ae4d9b39285d84dad731893444f7027945900fb Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Sun, 2 Feb 2020 13:41:39 +0100 Subject: Bump version Change-Id: I4c8522c91301ebd3df13358055e9289b9bddcc32 --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 09a75f0..35dba54 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.14.1 +MODULE_VERSION = 5.14.2 -- cgit v1.2.3