include/svx/srchdlg.hxx | 2 +- svx/source/dialog/srchdlg.cxx | 2 +- vcl/qt5/QtInstanceFrame.cxx | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-)
New commits: commit de7cfac4df2d32da2eb75affffe3c36e0b89adbf Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Sat Nov 30 02:52:09 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Nov 30 09:41:36 2024 +0100 tdf#130857 qt weld: Assign QtInstanceFrame::m_pGroupBox That was apparently forgotten in commit 0a4ec73c23678cc1008f191a08963c331255db61 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Fri Oct 25 10:04:10 2024 +0200 tdf#130857 qt weld: Add a QtInstanceFrame and none of the dialogs declared as supported this far was actually calling any method making use of it, as that would have triggered nullptr dereference. (Seen now while experimenting with adding support for the "Search and Replace" dialog.) Change-Id: I84ec83f4d4af8b2828e5033f366037b3114629d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177578 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceFrame.cxx b/vcl/qt5/QtInstanceFrame.cxx index 07a38dd7a60d..3943805db558 100644 --- a/vcl/qt5/QtInstanceFrame.cxx +++ b/vcl/qt5/QtInstanceFrame.cxx @@ -13,7 +13,9 @@ QtInstanceFrame::QtInstanceFrame(QGroupBox* pGroupBox) : QtInstanceContainer(pGroupBox) + , m_pGroupBox(pGroupBox) { + assert(m_pGroupBox); } void QtInstanceFrame::set_label(const OUString& rText) commit 9ccfc8a719bfcb34baff8559dc33a9cd5b638646 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Sat Nov 30 02:36:07 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Nov 30 09:41:21 2024 +0100 tdf#130857 Search dialog: Use weld::Container ptr instead of Box None of the weld::Box methods are used, so having a pointer to the weld::Container subclass is sufficient in the "Find and Replace" dialog implementation. Change-Id: I1219dd657ab8fb6067c90aabdc27b2b84c0a1443 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177577 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 1b9a0f067f93..a5ee0f8d8cf1 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -187,7 +187,7 @@ private: std::unique_ptr<weld::Label> m_xSearchAttrText; std::unique_ptr<weld::Label> m_xSearchLabel; std::unique_ptr<weld::Image> m_xSearchIcon; - std::unique_ptr<weld::Box> m_xSearchBox; + std::unique_ptr<weld::Container> m_xSearchBox; std::unique_ptr<weld::Frame> m_xReplaceFrame; std::unique_ptr<weld::ComboBox> m_xReplaceLB; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 480042ea2ce7..6d9d597e90d1 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -261,7 +261,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi , m_xSearchAttrText(m_xBuilder->weld_label(u"searchdesc"_ustr)) , m_xSearchLabel(m_xBuilder->weld_label(u"searchlabel"_ustr)) , m_xSearchIcon(m_xBuilder->weld_image(u"searchicon"_ustr)) - , m_xSearchBox(m_xBuilder->weld_box(u"searchbox"_ustr)) + , m_xSearchBox(m_xBuilder->weld_container(u"searchbox"_ustr)) , m_xReplaceFrame(m_xBuilder->weld_frame(u"replaceframe"_ustr)) , m_xReplaceLB(m_xBuilder->weld_combo_box(u"replaceterm"_ustr)) , m_xReplaceTmplLB(m_xBuilder->weld_combo_box(u"replacelist"_ustr))