Reuse the logic previously implemented in QtInstanceEntry::set_message_type by moving it to a static helper method that takes a QLineEdit* param, and for QtInstanceComboBox::set_entry_message_type, pass the combo box's line edit. Change-Id: I8e81c9473da294d2a8c863ed143d735c30ade2a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177829 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
While QtInstanceEntry generally takes care of handling signals for the spinbox's QLineEdit, this doesn't work when the value is changed as a result of setting a new spinbox value (e.g. by using the spinbox buttons), as the QLineEdit signals are blocked then, see QAbstractSpinBoxPrivate::updateEdit in qtbase [1]. Therefore, connect the QDoubleSpinBox::textChanged signal to the slot that calls signal_changed() instead to ensure it gets called nonetheless, and disconnect from the other signal. While at it, also add a SolarMutexGuard when calling the signal. This fixes the issue noticed with the "Go to Page" dialog mentioned in previous commit Change-Id: I1f24cf3925e945ae78a9f1646535e08736cd8786 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Nov 27 23:53:58 2024 +0100 tdf#130857 qt weld: Support "Go to Page" dialog as: > One issue seen with the dialog is that by using the > up arrow of the spinbox to increase the value, it > is currently possible to increase the value > beyond the maximum value (last page number), > while this is not the case when typing a number > into the box manually. > > This is because the GotoPageDlg::PageModifiedHdl > handler currently only gets called for the > latter case, not the former one, despite > > Change-Id: Ie19bc852f4ceed0fa79565302975376db7126ea4 > Author: Michael Weghorn <m.weghorn@posteo.de> > Date: Wed Nov 27 22:53:55 2024 +0100 > > tdf#130857 qt weld: Also notify about programmatic text changes > > and will be addressed in a separate commit. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/widgets/qabstractspinbox.cpp?id=ced47a590aeb85953a16eaf362887f14c2815c45#n1790 Change-Id: Ifba9a0877442f9e84f0103d8aab202ae3583c5cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177451 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Following commit 4f08a15f3be9b39d0f1e83e6cffa47b62c183b69 Author: lovatico21 <lorenzo04lovato@gmail.com> Date: Wed Nov 13 18:12:58 2024 +0100 updated vim footers in vcl/qt6/*.cxx , update vim header/trailers to those in current `TEMPLATE.SOURCECODE.HEADER` for other qt5/qt6 headers and sources as well (i.e. for directories `vcl/inc/qt5`, `vcl/inc/qt6` and `vcl/qt5/`). Change-Id: If9fea8f4ce955396f064dbd9fd706e76d947bce1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176705 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In QtInstanceEntry, notify about cursor and text changes by connecting to the corresponding QLineEdit signals and calling weld::Entry::signal_cursor_position and weld::Entrysignal_changed accordingly. This is made use of e.g. in the "Tools" -> "Options" -> "Languages and Locales" -> "Writing Aids" -> "New" dialog" in a WIP branch where that dialog's .ui file ("cui/ui/optnewdictionarydialog.ui") was added to the list of supported files for QtInstanceBuilder. Without this commit, the "OK" button would remain greyed out even after typing a new name in the edit. Change-Id: I006ed711652c65b0af1d8af5ae5c4dc80691a9b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175545 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Add a native Qt implementation for weld::Entry, QtInstanceEntry, that uses a QLineEdit, and let QtInstanceBuilder use it when it encounters a "GtkEntry" object in a .ui file. Implement the most straightforward and probably most relevant methods, and trigger an assert in case one of the not yet implemented methods gets called for now. These can be implemented when adding support for .ui files whose dialogs make use of these features. None of the .ui files currently marked as supported by QtInstanceBuilder uses this new class yet, but it will be needed to support more in the future. Change-Id: I56e26fe22b1cc0cb7d61cfd1503991273957e23f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174489 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>