vcl/qt5/QtInstanceBuilder.cxx | 2 ++ vcl/qt5/QtInstanceTreeView.cxx | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-)
New commits: commit 1d59884bd1cc0be2f85663728600078a51bad8da Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jul 25 07:18:58 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Jul 25 12:09:43 2025 +0200 tdf#130857 qt weld: Support doc versions 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: * start Writer * save document * "File" -> "Versions..." Change-Id: I228a11552980b3934508f640824628f3c4e5fca0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188309 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 1b67be6428d3..3658886c3939 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -150,6 +150,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"sfx/ui/safemodequerydialog.ui"_ustr, u"sfx/ui/templatecategorydlg.ui"_ustr, u"sfx/ui/versioncommentdialog.ui"_ustr, + u"sfx/ui/versionsofdialog.ui"_ustr, u"svt/ui/addresstemplatedialog.ui"_ustr, u"svt/ui/printersetupdialog.ui"_ustr, u"svt/ui/restartdialog.ui"_ustr, commit a759dc1fd0dbc4acabaa5261b94dcdf4fb56c5c6 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jul 25 07:16:11 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Jul 25 12:09:37 2025 +0200 tdf#130857 qt weld: Support "Insert Version Comment" 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: * start Writer * save document * "File" -> "Versions..." * press "Save New Version" button Change-Id: Ie7e0eaa01759b1a8f78a6d8fd4cb49c5cf4b9c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188308 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 5600cb05a737..1b67be6428d3 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -149,6 +149,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile, const weld::W u"sfx/ui/querysavedialog.ui"_ustr, u"sfx/ui/safemodequerydialog.ui"_ustr, u"sfx/ui/templatecategorydlg.ui"_ustr, + u"sfx/ui/versioncommentdialog.ui"_ustr, u"svt/ui/addresstemplatedialog.ui"_ustr, u"svt/ui/printersetupdialog.ui"_ustr, u"svt/ui/restartdialog.ui"_ustr, commit afd97e40b9162ac6217a562b8b72d6608a2a5e6f Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jul 25 07:12:17 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Jul 25 12:09:32 2025 +0200 tdf#130857 qt weld: Implement QtInstanceTreeView::{g,s}et_column_title This will be used e.g. by the "File" -> "Versions..." dialog which will be declared as supported in an upcoming commit. Change-Id: I27b2b7fceb831ec16c243f891079391d94d75c4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188307 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx index 134095438fc7..f8f016d79f59 100644 --- a/vcl/qt5/QtInstanceTreeView.cxx +++ b/vcl/qt5/QtInstanceTreeView.cxx @@ -905,15 +905,26 @@ int QtInstanceTreeView::get_column_width(int nCol) const void QtInstanceTreeView::set_centered_column(int) { assert(false && "Not implemented yet"); } -OUString QtInstanceTreeView::get_column_title(int) const +OUString QtInstanceTreeView::get_column_title(int nColumn) const { - assert(false && "Not implemented yet"); - return OUString(); + SolarMutexGuard g; + + OUString sTitle; + GetQtInstance().RunInMainThread([&] { + const QVariant aVariant = m_pModel->headerData(nColumn, Qt::Horizontal); + assert(aVariant.isValid() && aVariant.canConvert<QString>()); + sTitle = toOUString(aVariant.toString()); + }); + + return sTitle; } -void QtInstanceTreeView::set_column_title(int, const OUString&) +void QtInstanceTreeView::set_column_title(int nColumn, const OUString& rTitle) { - assert(false && "Not implemented yet"); + SolarMutexGuard g; + + GetQtInstance().RunInMainThread( + [&] { m_pModel->setHeaderData(nColumn, Qt::Horizontal, toQString(rTitle)); }); } void QtInstanceTreeView::set_selection_mode(SelectionMode eMode)