vcl/qt5/QtBuilder.cxx | 7 ++++++- vcl/qt5/QtInstanceBuilder.cxx | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
New commits: commit d47bfc293a151da16231c7643b038d75d1d4675f Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Oct 29 21:53:43 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Oct 30 09:09:39 2024 +0100 tdf#130857 qt weld: Declare support for "Enter Safe Mode" dialog Add .ui file for the "Help" -> "Restart In Safe Mode" dialog that asks whether to really restart in safe mode to list of files supported by QtInstanceBuilder, so that native Qt widgets are used for that dialog now when using the qt5/qt6 VCL plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set. Change-Id: Idec1c2dedd057aa2322453471c55022442941f7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175807 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 891adaae9c14..5831683f11a4 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -55,6 +55,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile) u"modules/swriter/ui/wordcount.ui"_ustr, u"sfx/ui/licensedialog.ui"_ustr, u"sfx/ui/querysavedialog.ui"_ustr, + u"sfx/ui/safemodequerydialog.ui"_ustr, u"svt/ui/printersetupdialog.ui"_ustr, u"svt/ui/restartdialog.ui"_ustr, u"writerperfect/ui/exportepub.ui"_ustr, commit 775156dcea529a9adff714f0f55df825488e2f4e Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Oct 29 21:27:50 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Oct 30 09:09:27 2024 +0100 tdf#130857 qt weld: Support hiding plain text in entry Evaluate the "visibility" GtkEntry property [1] [2] and set the QLineEdit's echoMode [3] to QLineEdit::Password if the visibility is set to false, so that replacement characters are shown instead of the actual text as expected. This is used e.g. in password dialogs, e.g. in Writer: "File" -> "Properties" -> "Security", press "Protect..." button. (But this dialog is not using native Qt widgets yet, more needs to be implemented first.) [1] https://docs.gtk.org/gtk3/property.Entry.visibility.html [2] https://docs.gtk.org/gtk3/method.Entry.set_visibility.html [3] https://doc.qt.io/qt-6/qlineedit.html#echoMode-prop Change-Id: I218e4721bbc21f3d6a3553647e92c1ea7cdc4a0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175806 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index 4d500976c160..2abc2208e64f 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -176,7 +176,12 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, cons } else if (sName == u"GtkEntry") { - pObject = new QLineEdit(pParentWidget); + QLineEdit* pLineEdit = new QLineEdit(pParentWidget); + auto aIt = rMap.find(u"visibility"_ustr); + if (aIt != rMap.end() && !toBool(aIt->second)) + pLineEdit->setEchoMode(QLineEdit::Password); + + pObject = pLineEdit; } else if (sName == u"GtkFrame") {