summaryrefslogtreecommitdiff
path: root/xmlsecurity
ModeNameSize
-rw-r--r--AllLangMoTarget_xsc.mk468logplain
-rw-r--r--CppunitTest_qa_certext.mk714logplain
-rw-r--r--CppunitTest_xmlsecurity_dialogs_test.mk1825logplain
-rw-r--r--CppunitTest_xmlsecurity_pdfsigning.mk1923logplain
-rw-r--r--CppunitTest_xmlsecurity_signing.mk2561logplain
-rw-r--r--CppunitTest_xmlsecurity_signing2.mk2579logplain
-rw-r--r--Executable_pdfverify.mk879logplain
-rw-r--r--IwyuFilter_xmlsecurity.yaml5975logplain
-rw-r--r--Library_xmlsecurity.mk3191logplain
-rw-r--r--Library_xsec_xmlsec.mk5234logplain
-rw-r--r--Makefile478logplain
-rw-r--r--Module_xmlsecurity.mk1314logplain
-rw-r--r--README.md1192logplain
-rw-r--r--UIConfig_xmlsec.mk838logplain
d---------doc239logplain
d---------inc974logplain
d---------qa104logplain
d---------source202logplain
d---------test_docs178logplain
d---------uiconfig / ui29logplain
d---------util318logplain
d---------workben41logplain
lass='decoration'>Ilmari Lauhakangas per the current template in TEMPLATE.SOURCECODE.HEADER Change-Id: I06b36a22d0a62c46e0e0c99f27e1035e9f24e1a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176549 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins 2024-11-13added license header and vim footerlovatico21 Change-Id: Ic4fb58b4285fc657808bc947c79921dad7f4c666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176506 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins 2024-11-10tdf#130857 qt weld: Add QtInstanceNotebook skeletonMichael Weghorn Add a new QtInstanceNotebook class that is the weld::Notebook implementation using a native Qt widget. It uses a QTabWidget. Initially, all methods trigger an assert; the actual logic still needs to be implemented in future commits. Let QtBuilder handle "GtkNotebook" objects by creating a QTabWidget and let QtInstanceBuilder::weld_notebook return an instance of the new class. Change-Id: I5a0671a1ba98bea3e0659e4f280706179bfb4d47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176322 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-11-09tdf#130857 qt weld: Add QtInstanceTreeView skeletonMichael Weghorn Add a new QtInstanceTreeView class that is the weld::TreeView implementation using a native Qt widget. It uses a QTreeView. Initially, all methods trigger an assert; the actual logic still needs to be implemented in future commits. Let QtBuilder handle "GtkTreeView" objects by creating a QTreeView. Let QtInstanceBuilder::weld_treeview return an instance of the new class. Change-Id: Ia3e694dbef9033fe45a6d2bdbe09fc021cd47c58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176307 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-11-08tdf#130857 qt weld: Add initial SpinButton supportMichael Weghorn Add new class QtInstanceSpinButton that is the weld::SpinButton implementation using native widgets. Initially, implement the actual logic of only some methods, and let the others trigger an assert for now. (These can be implemented once needed to support more dialogs.) Initially, assume that the value is an integer (which is the case for the "Table" -> "Insert" -> "Rows" dialog in Writer, for which support will be declared in an upcoming commit). However, already use a QDoubleSpinBox that supports floating point values instead of QSpinBox (that can only handle integer values) to prepare for extending the implementation accordingly later. In QtBuilder, handle "GtkSpinButton" objects, create a QDoubleSpinBox for them and evaluate the "digits" and "adjustment" properties to set the corresponding values for the QDoubleSpinBox. Let QtInstanceBuilder::weld_spin_button return an instance of the newly added class. Change-Id: I0808589a3e6bece749c0ae4541f2419410ea99bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176248 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-11-07tdf#130857 qt weld: Add QtInstanceDrawingArea basicsMichael Weghorn Add a new QtInstanceDrawingArea class as the weld::DrawingArea implementation using native Qt widgets. Initially only add the "basic structure" (most of the actual functionality of drawing will be added separately): * Add the QtInstanceDrawingArea class with most methods currently still unimplemented and triggering an assert when they get called. * Add a `ScopedVclPtrInstance<VirtualDevice> m_xDevice` member and return that in `QtInstanceDrawingArea::get_ref_device`, as the gtk3 implementation (GtkInstanceDrawingArea) does. * Let QtBuilder::makeObject create a QLabel for a "GtkDrawingArea" object for now. That label will hold a pixmap (which should be sufficient for simple cases at least). * Let QtInstanceBuilder::weld_drawing_area return an instance of the new class. Change-Id: I5d509ccd9f5a7a826a166958af4a92ff01cc0225 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176171 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-11-06tdf#158943 Libreoffice Theme Part 3: Qt Color CustomizationSahil Gautam Enable UI color customization in QT via the use of custom palettes and custom style objects for the application, and the native widgets like the menus and the menubar. Menubar in `kf6` doesn't follow the set palette's colors anymore, maybe some update from kde/qt (something to look into). Works fine for `kf5`. ticket: https://bugs.kde.org/show_bug.cgi?id=493550 Change-Id: Ibedd6d66b8ea2855e049a85b3d51ea7e933b5c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168901 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins 2024-10-30tdf#130857 qt weld: Add a QtInstanceProgressBarMichael Weghorn Add a new QtInstanceProgressBar class that is the weld::ProgressBar implementation using a native Qt widget. The widget used is a QProgressBar. This will be used e.g. by the print progress dialog, for which support will be declared in an upcoming commit. Change-Id: Ic4b162014cd3a09801096cebd38dbdc923f5dbfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175816 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-10-30tdf#130857 qt weld: Add a QtInstanceLevelBarMichael Weghorn Add a new QtInstanceLevelBar class that is the weld::LevelBar implementation using a native Qt widget. The widget used is a QProgressBar. This is used e.g. in password dialogs where the level bar is used as an indicator for the password strength, e.g. in Writer: "File" -> "Properties" -> "Security", press "Protect..." button. (But this is not using native Qt widgets yet, more needs to be implemented first.) Change-Id: I4400b8d1a03e8978bc96152166dec87f8134f48f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175805 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-26tdf#130857 qt weld: Add a QtInstanceLinkButtonMichael Weghorn Add a new QtInstanceLinkButton class that is the weld::LinkButton implementing using a native Qt widget. QLabel can be used to display a hyperlink, as it supports the HTML syntax for the text, so using , QLabel myLabel; myLabel.setText(QLatin1String("<a href=\"https://www.libreoffice.org">LibreOffice Website</a>")); can be used to let the QLabel handle a hyperlink. To make it simple to set this as needed for a QLabel, implement a new QLabel subclass called QtHyperlinkLabel that provides convenient getters and setters to set the displayed text and the link target, and takes care of setting the QLabel text based on that as needed. Implement QtInstanceLinkButton using an instance of that class as the widget and create an instance of that class in QtBuilder when encountering a "GtkLinkButton" object while processing a .ui file and evaluate the "label" and "uri" properties. Change-Id: I71d28b6e5e3cbd110ec5b3d1232d55e9d2bb8a1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175656 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-26tdf#130857 qt weld: Add QtInstanceImage skeletonMichael Weghorn Add a new class QtInstanceImage as a weld::Image implementation using native Qt widgets. It uses a QLabel that holds the Image, which can be set using QLabel::setPixmap [1]. This commit adds the new class, lets QtInstanceBuilder::weld_image return an instance of the new class, and extends QtBuilder to create a QLabel when it encounters a "GtkImage" object. The logic to actually set the image when either processing the .ui file or when one of the weld::Image::set_from_icon_name or one of the weld::Image::set_image variants gets called still needs to be implemented in subsequent commits for the label to actually display an image. [1] https://doc.qt.io/qt-6/qlabel.html#pixmap-prop Change-Id: I3aa526b89487a5301dabd108723d7b68ca85ea66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175655 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-25tdf#130857 qt weld: Add QtInstanceRadioButtonMichael Weghorn Implement initial support for native radio buttons using QRadioButton: * Let QtBuilder create a QRadioButton widget when it encounters a "GtkRadioButton" object. * Let QtBuilder::setProperties also handle the QRadioButton case. Both, QRadioButton and QCheckBox derive from QAbstractButton, so reuse the existing logic for QCheckBox to set label and checked status. * Add new class QtInstanceRadioButton as a weld::RadioButton implementation that uses a QRadioButton widget. * Let QtInstanceBuilder::weld_radio_button return an instance of the new class. For now, ignore the GtkRadioButton "group" property [1] that is used to group radio buttons. QRadioButton's are automatically grouped when they have the same parent widget, which is sufficient for the case of the "Alignment" dialog in Math for which support will be declared in an upcoming commit. For more complex scenarios, the use of QButtonGroup [2] could be implemented in the future to explicitly group radio buttons, as mentioned in the QRadioButton doc [3]: > If you need multiple exclusive button groups for radio buttons that > belong to the same parent widget, put them into a QButtonGroup. [1] https://docs.gtk.org/gtk3/property.RadioButton.group.html [2] https://doc.qt.io/qt-6/qbuttongroup.html [3] https://doc.qt.io/qt-6/qradiobutton.html Change-Id: Iaf8b0fef00fc10268c09410080156e7913634ab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175639 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-25tdf#130857 qt weld: Add a QtInstanceFrameMichael Weghorn Add new class QtInstanceFrame as a native Qt implementation for weld::Frame. This uses a QGroupBox as a widget, see commit e2e59d2da1aa4c9f8df62e5a072f0f2cd931781b Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 10:38:32 2024 +0200 tdf#130857 qt weld: Create QGroupBox for "GtkFrame" Return an instance of it in QtInstanceBuilder::weld_frame. This is used e.g. by the "File" -> "Export as" -> "Export as EPUB" dialog in Writer. Change-Id: I099b8f38fb884881d8d8db38aa918c76f25b6d5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175625 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-10-23tdf#130857 qt weld: Add initial combobox handlingMichael Weghorn * Add new class QtInstanceComboBox as a weld::ComboBox implementation using a native QComboBox. Implement some of the most important and straightforward methods and trigger an assert for all others for now. * In QtBuilder::makeObject, handle the "GtkComboBoxText" case and create a QComboBox for that. * Implement QtInstanceBuilder::weld_combo_box to return a QtInstanceComboBox instance. Change-Id: I2ac2d0f55a948ea2f090c81096484e22899ddcbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175443 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-05tdf#130857 qt weld: Add a QtInstanceTextViewMichael Weghorn Add a native Qt implementation for weld::TextView QtInstanceTextView, that uses a QPlainTextEdit, and let QtInstanceBuilder use it when it encounters a "GtkTextView" object in a .ui file. Implement methods which are probably the most relevant ones. For now, trigger an assert in case any of the not yet implemented methods gets called. 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, e.g. for cui/uiconfig/ui/objecttitledescdialog.ui. With this commit in place, adding that file to the set of supported ones in QtInstanceBuilder::IsUIFileSupported makes the dialog somehow show up as a native Qt dialog with the qt6 VCL plugin when e.g. selecting a QR code in an existing document, then opening the context menu and choosing "Alt Text", but there are various issues that still need to be fixed before it can actually be claimed as working/supported. Change-Id: Id7217d4a8a86f953d8b289c8a09cb8d1e2040bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174495 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-10-05tdf#130857 qt weld: Add QtInstanceEntryMichael Weghorn 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> 2024-10-02tdf#130857 qt weld: Add QtInstanceCheckButtonMichael Weghorn Add a QtInstanceCheckButton as the native Qt implementation for a weld::CheckButton. This uses a QCheckBox. Handle the "GtkCheckButton" object type from .ui files in QtBuilder. This will e.g. be needed for the "Insert" -> "Axes..." dialog seen in Calc after a chart has been inserted and double-clicked -- once further remaining aspects needed to be able to support that dialog has been implemented and it will be enabled in QtInstanceBuilder::IsUIFileSupported. The handling for the "inconsistent" state is mostly based on the the VCL implementation, see SalInstanceCheckButton::set_inconsistent etc. QtInstanceCheckButton::QtInstanceCheckButton::set_label_wrap remains unimplemented for now and triggers an assert, can be implemented when adding support for a dialog that actually makes use of it. Change-Id: I1e43ba25a23312534ee7cc0e650cd6e7aae20000 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174398 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-10-02tdf#130857 qt weld: Add initial QtInstanceLabel implementationMichael Weghorn Add a new QtInstanceLabel class as the native Qt weld::Label implementation and implement the straightforward and most important methods, and let the less common ones trigger an assert for now. Implement QtInstanceBuilder::weld_label to return an instance of QtInstanceLabel. This will e.g. be needed when adding support for the "Tools" -> "Word Count" dialog in Writer in the future, once more missing aspects have been implemented. Change-Id: I911bd68ad641b15883a0c6aa0707fd590fc05f96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174366 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-09-25tdf#130857 qt weld: Implement QtBuilder + use it for first msg dialogOmkarAcharekar This implements an initial QtBuilder, which is used by QtInstanceBuilder to create weld::Widget instances using native Qt widgets. This tries to be close to the VCL implementation (VclBuilder). The selected approach is based on Caolán's suggestion in [1] to rework VclBuilder to have overridable methods for widgets creation. This way, we can have common code for the UI parser but the function for widget creation is different. Qt equivalents for Gtk's widget classes in the .ui files: * GtkMessageDialog -> QMessageBox * GtkBox -> QLayout (can be QVBoxLayout/QHBoxLayout based on property in .ui file) * GtkButtonBox -> QDialogButtonBox * GtkButton -> QPushButton As QMessageBox already comes with a layout and a QDialogButtonBox, don't create new ones, but return the existing ones in QtBuilder::makeObject. This commit implements initial support for the above-mentioned widget types and adds the first message dialog to the list of supported .ui files in QtInstanceBuilder::IsUIFileSupported, so a native QMessageBox is used for it now, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS is set when starting LibreOffice. The dialog ("modules/swriter/ui/inforeadonlydialog.ui") gets shown when taking the following steps: * start Writer * type "hello world" * select text * "Insert" -> "Section" * tick the "Protect" checkbox in the "Write Protection" section * close dialog via "Insert" button * try to type in the protected section The dialog can be dismissed using the default "OK" button. (Handling for response codes for buttons is not implemented yet, which will be needed when welding dialogs that have multiple buttons resulting in different behavior depending on what button gets clicked.) This change was originally submitted as a WIP change as part of Omkar Acharekar's Outreachy project "Implement Qt/KDE Frameworks theming using native Qt widgets" (see [2]), then further refined by Michael Weghorn. [1] https://lists.freedesktop.org/archives/libreoffice/2023-December/091288.html [2] https://lists.freedesktop.org/archives/libreoffice/2023-December/091281.html Co-authored-by: Michael Weghorn <m.weghorn@posteo.de> Change-Id: I6dd010a2138c245dc1e6d83dd08123898e9d9048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161831 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-09-18tdf#130857 qt weld: Add QtInstanceBuilder skeletonOmkarAcharekar Add new `QtInstanceBuilder` that derives from `weld::Builder` and is meant to use `weld::Widget` implementations using native Qt widgets. Override `SalInstance::CreateBuilder` in `QtInstance` to return an instance of the new `QtInstanceBuilder` for UI files that that one can handle/supports. As of now, `QtInstanceBuilder` doesn't yet implement what's needed, so `QtInstanceBuilder::IsUIFileSupported` currently still always returns `false`, meaning that `SalInstanceBuilder` is still always used in practice. The idea is to implement funcationality needed for a specific UI file/dialog in `QtInstanceBuilder`, then add it to the set of supported UI files in `QtInstanceBuilder::IsUIFileSupported`. This allows looking at one .ui file at a time and only having to implement what is relevant for that particular one, without having to implement the full weld API at once. The use of `QtInstanceBuilder` can completely be disabled by starting LO with environment variable `SAL_VCL_QT_NO_WELDED_WIDGETS` set. This commit is mostly extraced from Omkar Acharekar's WIP Gerrit change [1] (patch set 22) with some further adjustments by Michael Weghorn. Patch set 23 of that WIP Gerrit change demonstrates adding support for a dialog (the "Save Document?" one), but still needs more work. [1] https://gerrit.libreoffice.org/c/core/+/161831 Co-authored-by: Michael Weghorn <m.weghorn@posteo.de> Change-Id: If2d1ea30d43c2c1d84d64e577035489c8e158a7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173592 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-08-07tdf#162351 tdf#130857 qt weld: Add basic QtInstanceButtonMichael Weghorn Add a very basic native Qt implementation for `weld::Button`. It currently doesn't really implement many methods and just triggers an assert when they get called. Change-Id: I7a15266e978ca3bb030c847822a82d8d58c4c189 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171549 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-07-24qt: Move resolution calc to static helper methodMichael Weghorn Instead of duplicating the same code in both, `QtGraphics::GetResolution` and `QtSvpGraphics::GetResolution`, create a static helper method `QtGraphicsBase::ImplGetResolution` in their base class and call that. While at it, also move `QtGraphics::GetResolution` to the source file where all of the other `QtGraphics` methods are implemented. Change-Id: I721459e8b65756f214fee77ac4d3cb8e500f0b57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170930 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-01-08tdf#130857 Use native qt widgets - simple message dialogOmkarAcharekar - Implements CreateMessageDialog method for QtInstance which would create message dialogs using native qt widgets. Example - MasterPasswordCreateDialog ( https://git.libreoffice.org/core/+/5e8c0575e877795aaca91346548cd0136fa22048/uui/source/masterpasscrtdlg.cxx#64 ). To trigger this : a) Go to "Tools" -> "Options". b) Select "LibreOfficeDev" -> "Security", then check "Persistently save passwords for web connections". c) In the master password dialog, enter two different passwords and click "OK". The message dialog appears now uses native qt widgets. - adds Env variable SAL_VCL_QT_NO_WELDED_WIDGETS which reverts to previous behavior using VCL widgets. Note: most of the methods from weld::Widget hierarchy are currently just dummy implementations for Qt case, only what's needed for simple message dialogs has been implemented in this patch. Change-Id: I522489b8befb92f0092eb248ea2b81ecfbadd737 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161073 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2023-02-14--enable-qt6 constexpr template point of instantiation issueStephan Bergmann ...with --with-latest-c++, > In file included from vcl/qt6/QtMenu.cxx:10: > In file included from vcl/qt6/../qt5/QtMenu.cxx:10: > In file included from vcl/inc/qt6/QtMenu.hxx:10: > In file included from vcl/inc/qt6/../qt5/QtMenu.hxx:12: > In file included from vcl/inc/salmenu.hxx:24: > In file included from include/vcl/menu.hxx:23: > In file included from ~/llvm/inst/bin/../include/c++/v1/memory:898: > In file included from ~/llvm/inst/bin/../include/c++/v1/__memory/shared_ptr.h:31: > ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:63:19: error: invalid application of 'sizeof' to an incomplete type 'QMenu' > static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type"); > ^~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:297:7: note: in instantiation of member function 'std::default_delete<QMenu>::operator()' requested here > __ptr_.second()(__tmp); > ^ > ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:263:75: note: in instantiation of member function 'std::unique_ptr<QMenu>::reset' requested here > _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); } > ^ > vcl/inc/qt6/../qt5/QtMenu.hxx:40:7: note: in instantiation of member function 'std::unique_ptr<QMenu>::~unique_ptr' requested here > class QtMenu : public QObject, public SalMenu > ^ > /usr/include/qt6/QtCore/qmetatype.h:2331:47: note: in implicit destructor for 'QtMenu' first required here > reinterpret_cast<S *>(addr)->~S(); > ^ > /usr/include/qt6/QtCore/qmetatype.h:2370:41: note: in instantiation of member function 'QtPrivate::QMetaTypeForType<QtMenu>::getDtor' requested here > /*.dtor=*/ QMetaTypeForType<T>::getDtor(), > ^ > /usr/include/qt6/QtCore/qmetatype.h:2480:48: note: in instantiation of static data member 'QtPrivate::QMetaTypeInterfaceWrapper<QtMenu>::metaType' requested here > return &QMetaTypeInterfaceWrapper<Ty>::metaType; > ^ > /usr/include/qt6/QtCore/qmetatype.h:2537:16: note: in instantiation of function template specialization 'QtPrivate::qTryMetaTypeInterfaceForType<(anonymous namespace)::qt_meta_stringdata_QtMenu_t, QtPrivate::TypeAndForceComplete<QtMenu, std::integral_constant<bool, true>>>' requested here > QtPrivate::qTryMetaTypeInterfaceForType<Unique, T>()... > ^ > workdir/CustomTarget/vcl/qt6/QtMenu.moc:106:5: note: in instantiation of variable template specialization 'qt_incomplete_metaTypeArray<(anonymous namespace)::qt_meta_stringdata_QtMenu_t, QtPrivate::TypeAndForceComplete<QtMenu, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QtMenuItem *, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QtMenuItem *, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QtMenuItem *, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QAbstractButton *, std::integral_constant<bool, false>>>' requested here > qt_incomplete_metaTypeArray<qt_meta_stringdata_QtMenu_t, > ^ > vcl/inc/qt6/../qt5/QtMenu.hxx:23:7: note: forward declaration of 'QMenu' > class QMenu; > ^ Change-Id: I4b4a227411c380e97d4c357708009c5905cef44a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2022-08-24qt a11y: Remember and reuse existing QObject for XAccessibleMichael Weghorn Previously, a new `QtXAccessible` object was created for an `XAccessible` each time before `QAccessible::queryAccessibleInterface` was called, which is not only unnecessary but also causes various issues, e.g. it breaks walking the a11y hierarchy upwards (i.e. from children to parents), since a new object is created for the parent. This introduces `QtAccessibleRegistry` that keeps a mapping between the `XAccessible` and the associated `QObject`. That mapping is used to reuse already created objects instead of creating new ones for the same `XAccessible`. The entry for an `XAccessible` is removed again from the map in `QtAccessibleWidget::invalidate`, which gets called when the `XAccessible` gets disposed, s. `QtAccessibleEventListener::disposing`. With this in place, Orca now also nicely announces only the text of the push buttons themselves in the "Save Document?" dialog when switching between the buttons using the Tab key, rather than announcing the whole widget hierarchy every time (probably because creating a new object every time prevented Orca from recognizing that the previously selected pushbutton and the newly selected one are siblings, i.e. have the same parent object.) Change-Id: Ic890a387ff016e889f25dba70c82d0d81ae7a9e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138757 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2022-06-18Qt move most X11 specifics into QtX11SupportJan-Marek Glogowski Just some refactoring. Change-Id: I5b2ef531778d4d43d2fdc32fe7da59edffa3c02e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136061 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> 2021-09-29qt6: Add a qt6 VCL pluginMichael Weghorn This adds a new "qt6" VCL plugin based on Qt 6. Building the plugin is enabled by autogen option '--enable-qt6' (and optionally setting 'QT6DIR' as needed). Use the 'SAL_USE_VCLPLUGIN=qt6' environment variable before running LO to select this VCL plugin. Taking qt6 into account at all relevant places certainly still requires follow-up changes, but this builds and runs with a self-compiled qtbase from the 'dev' git branch as of commit 3ce0672143d2eb3c3809f82998a4d71c5800d77a. I didn't see anything obviously broken in a quick run, but didn't test much. This reuses and shares the qt5 VCL plugin code; the qt6 headers and sources for now just '#include' the qt5 ones. Version checks are used for the code places that need different handling to be built against Qt 6. The build system parts in this commit were mostly done by copying the qt5 equivalents, then adapting as needed. Some notes on things I came across while porting to qt6: 1) At least in my self-compiled Qt versions, 'moc' (the meta-object compiler) is located in the 'libexec' subdirectory in 'QT6DIR', while the Qt 5 equivalent is located in the "bin" subdirectory of 'QT5DIR', so the configure.ac check uses the former. 2) moc does not process classes from the included headers. Since the headers in 'vcl/inc/qt6' just '#include' the ones from 'vcl/inc/qt5', running moc on the qt6 headers doesn't work, so moc is currently run on the qt5 headers for qt6 as well (s. 'vcl/CustomTarget_qt6_moc.mk'). That will have to be adapted in case the qt6 VCL plugin uses "own" headers instead of just including the qt5 ones at some point. 3) QX11Extras has been removed from Qt 6. [1] says: > Changes to Qt X11 Extras > > The QX11Info class has been removed. > > Clients that still rely on the functionality can include the private > header <QtGui/private/qtx11extras_p.h> as a stopgap solution. To enable > private headers use QT += core-private with qmake, or add a project > dependency to Qt::CorePrivate with CMake. I didn't take any closer look, just dropped the use of QtX11Extras for qt6 for now. 4) XCB_ICCCM is no longer needed. It is only used in qt5 to workaround a Qt bug fixed in Qt 5.12, s. commit fe2baf9e84e0ca9aeaa683e37076f57fa3f38dca Author: Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> Date: Tue Dec 3 08:32:58 2019 +0100 Qt5 fix missing XCB_ICCCM_WM_HINT_WINDOW_GROUP 5) X11-specific code is still used for key modifier handling. Therefore, still check for the XCB headers when 'USING_X11' is set in configure.ac, and use a 'QT6_USING_X11' define (as qt5 uses 'QT5_USING_X11'). 6) There's currently no Qt 6 video sink for GStreamer. As of today, qt-gstreamer is unmaintained and there is no Qt 6 version. The project's README [2] says: > 0. Maintenance Notice > --------------------- > > This code is unmaintained. You can use it at your own risk. > > If you want to integrate video display in your QML-based UI, > you should consider using 'qmlglsink', from gst-plugins-good. > This is a well supported video sink that uses the generic > gstreamer-gl stack and is in many ways superior to 'qtquick2videosink' > that is provided by qt-gstreamer. You can use this code as an example: > https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/qt/qmlsink > > If you are not interested in using QML in your UI, then you > may use one of the other elements provided by this module > (see below). If you do that, it would be helpful to let us > know that this code is still useful to you. We may consider > adding these elements in one of the core gstreamer modules. > > If you are here for the Qt-style bindings, I'm sorry to disappoint you. > The alternative is to use the C API, or the GStreamermm C++ API. > Qt-style bindings are cool, but unfortunately they are very hard > to maintain because they are written by hand. If you are interested > in continuing this project, you are welcome to implement a > generator for them, probably based on GObject-Introspection. > I am happy to provide directions if you want to pursue such a thing. Therefore, the Qt video sink handling is qt5-only and the corresponding handling for GOBJECT (used for the GStreamer video sink handling) was not taken over for qt6. This presumably means that video playback in Impress presentations does not work when using qt6 with they Qt Wayland plugin, s. tdf#125219 for the corresponding bug for qt5/kf5. (I did not build the qtwayland module to actually test this, though. Video playback with the Qt xcb plugin in a Wayland session works.) [1] https://doc-snapshots.qt.io/qt6-dev/extras-changes-qt6.html [2] https://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/README Change-Id: Ib105ccfb2c3630ec5d5403793a3cd9ba31d85bdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122808 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>