vcl/inc/qt5/QtInstanceBox.hxx | 3 +++ vcl/qt5/QtInstanceBox.cxx | 20 +++++++++++++++++++- vcl/qt5/QtInstanceBuilder.cxx | 13 ++++++++----- 3 files changed, 30 insertions(+), 6 deletions(-)
New commits: commit 4ec725063c96da03457392b1f0811eb1b064b48b Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jul 29 21:14:51 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Jul 30 14:30:34 2025 +0200 tdf#130857 qt weld: Support graphics test dialog This means that native Qt widgets are used for that dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. To trigger the dialog: * in "Tools" -> "Options" -> "Advanced", enable experimental features * restart * "Tools" -> "View" -> "Run Graphic Tests" This dialogs makes use of weld::Box::reorder_child for which support was added in previous commit Change-Id: Ib6e4f31107a0bdcf7cd5af92e3f043b4104ceba2 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Jul 29 21:12:23 2025 +0200 tdf#130857 qt weld: Implement QtInstanceBox::reorder_child Change-Id: I386f744a7889968c19f65c2dc22d836e5587a7d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188547 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 43d8736d207c..58acb306f97f 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -71,6 +71,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"cui/ui/editdictionarydialog.ui"_ustr, u"cui/ui/fontfeaturesdialog.ui"_ustr, u"cui/ui/fontfragment.ui"_ustr, + u"cui/ui/graphictestdlg.ui"_ustr, u"cui/ui/imageviewer.ui"_ustr, u"cui/ui/insertrowcolumn.ui"_ustr, u"cui/ui/javastartparametersdialog.ui"_ustr, @@ -185,11 +186,12 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W // These UI files are only supported inside native Qt dialogs/widgets static std::unordered_set<OUString> aSupportedWithQtParent = { - u"cui/ui/appearance.ui"_ustr, u"cui/ui/possizetabpage.ui"_ustr, - u"cui/ui/rotationtabpage.ui"_ustr, u"cui/ui/slantcornertabpage.ui"_ustr, - u"cui/ui/textattrtabpage.ui"_ustr, u"cui/ui/textanimtabpage.ui"_ustr, - u"cui/ui/textcolumnstabpage.ui"_ustr, u"svt/ui/datewindow.ui"_ustr, - u"svx/ui/colorwindow.ui"_ustr, u"vcl/ui/editmenu.ui"_ustr, + u"cui/ui/appearance.ui"_ustr, u"cui/ui/graphictestentry.ui"_ustr, + u"cui/ui/possizetabpage.ui"_ustr, u"cui/ui/rotationtabpage.ui"_ustr, + u"cui/ui/slantcornertabpage.ui"_ustr, u"cui/ui/textattrtabpage.ui"_ustr, + u"cui/ui/textanimtabpage.ui"_ustr, u"cui/ui/textcolumnstabpage.ui"_ustr, + u"svt/ui/datewindow.ui"_ustr, u"svx/ui/colorwindow.ui"_ustr, + u"vcl/ui/editmenu.ui"_ustr, }; if (aSupportedUIFiles.contains(rUIFile)) commit 60bc838aa4c3f8da5f6cd81348d4414f5b728a86 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jul 29 21:12:23 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Jul 30 14:30:28 2025 +0200 tdf#130857 qt weld: Implement QtInstanceBox::reorder_child This will be used by an upcoming commit adding support for the Graphics test dialog that can be triggered as follows: * in "Tools" -> "Options" -> "Advanced", enable experimental features * restart * "Tools" -> "View" -> "Run Graphic Tests" Change-Id: Ib6e4f31107a0bdcf7cd5af92e3f043b4104ceba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188546 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/inc/qt5/QtInstanceBox.hxx b/vcl/inc/qt5/QtInstanceBox.hxx index 68ac5f22807b..82066f61dc2e 100644 --- a/vcl/inc/qt5/QtInstanceBox.hxx +++ b/vcl/inc/qt5/QtInstanceBox.hxx @@ -20,6 +20,9 @@ public: virtual void reorder_child(weld::Widget* pWidget, int nPosition) override; virtual void sort_native_button_order() override; + +protected: + virtual QBoxLayout& getLayout() const override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt5/QtInstanceBox.cxx b/vcl/qt5/QtInstanceBox.cxx index e98c220a330d..28d4e704714f 100644 --- a/vcl/qt5/QtInstanceBox.cxx +++ b/vcl/qt5/QtInstanceBox.cxx @@ -16,8 +16,26 @@ QtInstanceBox::QtInstanceBox(QWidget* pWidget) assert(qobject_cast<QBoxLayout*>(pWidget->layout()) && "widget doesn't have a box layout"); } -void QtInstanceBox::reorder_child(weld::Widget*, int) { assert(false && "Not implemented yet"); } +void QtInstanceBox::reorder_child(weld::Widget* pWidget, int nPosition) +{ + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { + QtInstanceWidget* pQtInstanceWidget = dynamic_cast<QtInstanceWidget*>(pWidget); + assert(pQtInstanceWidget); + QWidget* pQWidget = pQtInstanceWidget->getQWidget(); + assert(pQWidget); + + getLayout().removeWidget(pQWidget); + getLayout().insertWidget(nPosition, pQWidget); + }); +} void QtInstanceBox::sort_native_button_order() { assert(false && "Not implemented yet"); } +QBoxLayout& QtInstanceBox::getLayout() const +{ + return static_cast<QBoxLayout&>(QtInstanceContainer::getLayout()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ commit 08bd3c503e4e867635239b5cddd97992da51ce69 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jul 29 21:10:15 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Jul 30 14:30:21 2025 +0200 tdf#130857 qt weld: Support image viewer dialog This means that native Qt widgets are used for that dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. To trigger the dialog: * in "Tools" -> "Options" -> "Advanced", enable experimental features * restart * "Tools" -> "View" -> "Run Graphic Tests" * click on the "Passed" button of a test that passed Change-Id: I99b2e87d0c7be93ad24fc8055a0ff952e5d16d72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188545 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 3438e3008550..43d8736d207c 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -71,6 +71,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"cui/ui/editdictionarydialog.ui"_ustr, u"cui/ui/fontfeaturesdialog.ui"_ustr, u"cui/ui/fontfragment.ui"_ustr, + u"cui/ui/imageviewer.ui"_ustr, u"cui/ui/insertrowcolumn.ui"_ustr, u"cui/ui/javastartparametersdialog.ui"_ustr, u"cui/ui/namedialog.ui"_ustr,