vcl/qt6/QtMenu.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 862eda5f187d77f8d1f6e2a45fa33f8dd1ad5d5b
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Feb 13 22:20:56 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Feb 14 06:54:45 2023 +0000

    --enable-qt6 constexpr template point of instantiation issue
    
    ...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>>>' reques
 ted 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 <sberg...@redhat.com>

diff --git a/vcl/qt6/QtMenu.cxx b/vcl/qt6/QtMenu.cxx
index dd85319745ae..18c2d4c4e551 100644
--- a/vcl/qt6/QtMenu.cxx
+++ b/vcl/qt6/QtMenu.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <QtWidgets/QMenu>
+
 #include "../qt5/QtMenu.cxx"
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to