cui/source/dialogs/QrCodeGenDialog.cxx | 2 +- sw/qa/uitest/writer_tests3/insertQrCodeGen.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit ff20399edf0e8ab4c15e802e5b1aa400db42d33c Author: Stephan Bergmann <[email protected]> AuthorDate: Tue Dec 17 22:51:15 2024 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Wed Dec 18 07:10:06 2024 +0100 Some --disable-zxing fixes For one, UITest_writer_tests3 would crash soffie.bin in an --enable-dbgutil build with > include/vcl/vclptr.hxx:109: VclPtr<reference_type>::~VclPtr() [with reference_type = AbstractQrCodeGenDialog]: Assertion `(!m_rInnerRef.get() || m_rInnerRef->isDisposed() || m_rInnerRef->getRefCount() > 1) && "someone forgot to call dispose()"' failed. from within that test_insert_qr_code. But even with that out of the way, the test would still hang (in any kind of --disable-zxing build, not just --enable-dbgutil), with the Python process at > File "uitest/uitest/test.py", line 129, in wait_and_yield_dialog > time.sleep(DEFAULT_SLEEP) > File "uitest/uitest/test.py", line 151, in execute_dialog_through_command > yield from self.wait_and_yield_dialog(event, xDialogParent, close_button) > <built-in method next of module object at remote 0x7fb6fc6a0230> > File "instdir/program/python-core-3.10.16/lib/contextlib.py", line 135, in __enter__ > return next(self.gen) > File "sw/qa/uitest/writer_tests3/insertQrCodeGen.py", line 18, in test_insert_qr_code > with self.ui_test.execute_dialog_through_command(".uno:InsertQrCode") as xDialog: and the soffice.bin process idly yielding at > #14 0x00007fa582369b78 in Application::Yield () at vcl/source/app/svapp.cxx:473 > #15 0x00007fa582368a40 in Application::Execute () at vcl/source/app/svapp.cxx:360 > #16 0x00007fa58ca42fba in desktop::Desktop::Main (this=0x7fffe69ca960) at desktop/source/app/app.cxx:1679 Change-Id: I007d1497e6f0c968039af3649f6252794e222226 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178696 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx index 12d1e4847397..938800692b6d 100644 --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -274,7 +274,7 @@ bool QrCodeGenDialog::runAsync(const std::shared_ptr<QrCodeGenDialog>& rControll }); #else (void)rController; - (void)rFunc; + rFunc(RET_CANCEL); #endif return true; } diff --git a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py index 14856fd8da6b..cd39329431b2 100644 --- a/sw/qa/uitest/writer_tests3/insertQrCodeGen.py +++ b/sw/qa/uitest/writer_tests3/insertQrCodeGen.py @@ -7,12 +7,15 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +import os from uitest.framework import UITestCase from uitest.uihelper.common import type_text class insertQrCode(UITestCase): def test_insert_qr_code(self): + if os.getenv('ENABLE_ZXING') == 'TRUE': + with self.ui_test.create_doc_in_start_center("writer") as document: with self.ui_test.execute_dialog_through_command(".uno:InsertQrCode") as xDialog:
