/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef _SWCALWRP_HXX #define _SWCALWRP_HXX #include #include #include #include class SwCalendarWrapper : public CalendarWrapper { String sUniqueId; sal_uInt16 nLang; public: SwCalendarWrapper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMSF = ::comphelper::getProcessServiceFactory() ) : CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM ) {} void LoadDefaultCalendar( sal_uInt16 nLang ); }; salhelper::SingletonRef* s_getCalendarWrapper(); #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ o/cib/libreoffice-6-3'>distro/cib/libreoffice-6-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/vcl/qt6
AgeCommit message (Collapse)Author
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>