Problem compiling moc output
-
I'm attempting to build qwt using a Visual Studio project, and am getting some rather horrid errors reported when compiling the moc output files. For example:
1>C:\Qt\6.10.0\msvc2022_64\include\QtCore\qdatastream.h(423,27): error C2139: 'QPointF': an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_base_of' 1>(compiling source file 'x64/Debug/qt/moc/moc_qwt_plot_picker.cpp') 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qmetatype.h(1548,1): 1> see declaration of 'QPointF' 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(262,65): 1> while evaluating constexpr function 'QtMocHelpers::detail::MetaTypeList<false,Ret,const QList<QPointF> &>::copyTo' 1> with 1> [ 1> Ret=void 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(201,68): 1> while evaluating constexpr function 'QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::copyTo::<lambda_1>::operator ()' 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(204,19): 1> while evaluating constexpr function 'QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int,0,1,2,3,4>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::forEach::<lambda_1>::operator ()' 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(255,21): 1> while evaluating constexpr function 'QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int,0,1,2,3,4>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::forEach' 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(563,36): 1> while evaluating constexpr function 'QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::copyTo' 1> D:\Github\DSS\qwt-6.3.0\x64\Debug\qt\moc\moc_qwt_plot_picker.cpp(81,26): 1> while evaluating constexpr function 'QtMocHelpers::metaObjectData' 1> D:\Github\DSS\qwt-6.3.0\qwt_plot_picker.h(35,5): 1> while evaluating constexpr function 'QwtPlotPicker::qt_create_metaobjectdata' 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qdatastream.h(423,27): 1> the template instantiation context (the oldest one first) is 1> D:\Github\DSS\qwt-6.3.0\x64\Debug\qt\moc\moc_qwt_plot_picker.cpp(86,5): 1> see reference to variable template 'const auto QwtPlotPicker::qt_staticMetaObjectStaticContent<`anonymous namespace'::qt_meta_tag_ZN13QwtPlotPickerE_t>' being compiled 1> D:\Github\DSS\qwt-6.3.0\qwt_plot_picker.h(35,5): 1> see reference to variable template 'const QtMocHelpers::MetaObjectContents<60,22,81,11> QwtPlotPicker::qt_staticMetaObjectContent<`anonymous namespace'::qt_meta_tag_ZN13QwtPlotPickerE_t>' being compiled 1> D:\Github\DSS\qwt-6.3.0\x64\Debug\qt\moc\moc_qwt_plot_picker.cpp(81,26): 1> see reference to function template instantiation 'QtMocHelpers::MetaObjectContents<60,22,81,11> QtMocHelpers::metaObjectData<QwtPlotPicker,`anonymous-namespace'::qt_meta_tag_ZN13QwtPlotPickerE_t,QtMocHelpers::StringRefStorage<char [14],char [9],char [1],char [8],char [4],char [7],char [5],char [15],char [3],char [9],char [6]>,QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>,QtMocHelpers::UintData<>,QtMocHelpers::UintData<>,QtMocHelpers::UintData<>,QtMocHelpers::detail::UintDataBlock<0,0>>(uint,const Strings &,const Methods &,const Properties &,const Enums &,const Constructors &,const ClassInfo &)' being compiled 1> with 1> [ 1> Strings=QtMocHelpers::StringRefStorage<char [14],char [9],char [1],char [8],char [4],char [7],char [5],char [15],char [3],char [9],char [6]>, 1> Methods=QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>, 1> Properties=QtMocHelpers::UintData<>, 1> Enums=QtMocHelpers::UintData<>, 1> Constructors=QtMocHelpers::UintData<>, 1> ClassInfo=QtMocHelpers::detail::UintDataBlock<0,0> 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(563,22): 1> see reference to function template instantiation 'void QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::copyTo<`anonymous-namespace'::qt_meta_tag_ZN13QwtPlotPickerE_t,QtMocHelpers::MetaObjectContents<60,22,81,11>>(Result &,size_t,uint &) const' being compiled 1> with 1> [ 1> Result=QtMocHelpers::MetaObjectContents<60,22,81,11> 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(255,14): 1> see reference to function template instantiation 'void QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int,0,1,2,3,4>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::forEach<QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::copyTo::<lambda_1>>(F &&) const' being compiled 1> with 1> [ 1> F=QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::copyTo::<lambda_1> 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(204,13): 1> see reference to function template instantiation 'int QtMocHelpers::detail::UintDataStorage<std::integer_sequence<int,0,1,2,3,4>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::forEach::<lambda_1>::operator ()<QtMocHelpers::detail::UintDataEntry<2,QtMocHelpers::SignalData<void (const QList<QPointF> &)>>>(const _T2 &) const' being compiled 1> with 1> [ 1> _T2=QtMocHelpers::detail::UintDataEntry<2,QtMocHelpers::SignalData<void (const QList<QPointF> &)>> 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(201,67): 1> see reference to function template instantiation 'void QtMocHelpers::UintData<QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QRectF &)>,QtMocHelpers::SignalData<void (const QList<QPointF> &)>,QtMocHelpers::SignalData<void (const QPointF &)>,QtMocHelpers::SignalData<void (const QPointF &)>>::copyTo::<lambda_1>::operator ()<T>(const _T1 &) const' being compiled 1> with 1> [ 1> T=QtMocHelpers::SignalData<void (const QList<QPointF> &)>, 1> _T1=QtMocHelpers::SignalData<void (const QList<QPointF> &)> 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(262,51): 1> see reference to function template instantiation 'void QtMocHelpers::detail::MetaTypeList<false,Ret,const QList<QPointF> &>::copyTo<`anonymous-namespace'::qt_meta_tag_ZN13QwtPlotPickerE_t,Result>(Result &,uint &)' being compiled 1> with 1> [ 1> Ret=void, 1> Result=QtMocHelpers::MetaObjectContents<60,22,81,11> 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qtmochelpers.h(170,17): 1> see reference to function template instantiation 'const QtPrivate::QMetaTypeInterface *QtPrivate::qTryMetaTypeInterfaceForType<QtMocHelpers::detail::MetaTypeList<false,Ret,const QList<QPointF> &>::copyTo::U,const QList<QPointF>&>(void)' being compiled 1> with 1> [ 1> Ret=void 1> ] 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qmetatype.h(2675,48): 1> see reference to class template instantiation 'QtPrivate::QMetaTypeInterfaceWrapper<QtPrivate::qTryMetaTypeInterfaceForType::Ty>' being compiled 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qmetatype.h(2380,42): 1> see reference to variable template 'const bool has_stream_operator_v<QDataStream,QList<QPointF> >' being compiled 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qttypetraits.h(315,47): 1> see reference to variable template 'const bool has_ostream_operator_v<QDataStream,QList<QPointF> >' being compiled 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qttypetraits.h(296,86): 1> see reference to function template instantiation 'enable_if<std::conjunction_v<std::disjunction<std::is_base_of<QList<T>,T>,QTypeTraits::has_ostream_operator<QDataStream,T,void>>>,QDataStream&>::type operator <<(QDataStream &,const QList<T> &)' being compiled 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qdatastream.h(566,8): 1> see reference to alias template instantiation 'QDataStreamIfHasOStreamOperatorsContainer<QList<QPointF>,QPointF>' being compiled 1> C:\Qt\6.10.0\msvc2022_64\include\QtCore\qdatastream.h(423,27): 1> see reference to variable template 'const bool conjunction_v<std::disjunction<std::is_base_of<QList<QPointF>,QPointF>,QTypeTraits::has_ostream_operator<QDataStream,QPointF,void> > >' being compiledhere's the moc output - moc_qwt_plot_picker.cpp:
/**************************************************************************** ** Meta object code from reading C++ file 'qwt_plot_picker.h' ** ** Created by: The Qt Meta Object Compiler version 69 (Qt 6.10.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../../../../qwt_plot_picker.h" #include <QtCore/qmetatype.h> #include <QtCore/QList> #include <QtCore/qtmochelpers.h> #include <memory> #include <QtCore/qxptype_traits.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'qwt_plot_picker.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 69 #error "This file was generated using the moc from 6.10.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif #ifndef Q_CONSTINIT #define Q_CONSTINIT #endif QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_GCC("-Wuseless-cast") namespace { struct qt_meta_tag_ZN13QwtPlotPickerE_t {}; } // unnamed namespace template <> constexpr inline auto QwtPlotPicker::qt_create_metaobjectdata<qt_meta_tag_ZN13QwtPlotPickerE_t>() { namespace QMC = QtMocConstants; QtMocHelpers::StringRefStorage qt_stringData { "QwtPlotPicker", "selected", "", "QPointF", "pos", "QRectF", "rect", "QList<QPointF>", "pa", "appended", "moved" }; QtMocHelpers::UintData qt_methods { // Signal 'selected' QtMocHelpers::SignalData<void(const QPointF &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{ { 0x80000000 | 3, 4 }, }}), // Signal 'selected' QtMocHelpers::SignalData<void(const QRectF &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{ { 0x80000000 | 5, 6 }, }}), // Signal 'selected' QtMocHelpers::SignalData<void(const QVector<QPointF> &)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{ { 0x80000000 | 7, 8 }, }}), // Signal 'appended' QtMocHelpers::SignalData<void(const QPointF &)>(9, 2, QMC::AccessPublic, QMetaType::Void, {{ { 0x80000000 | 3, 4 }, }}), // Signal 'moved' QtMocHelpers::SignalData<void(const QPointF &)>(10, 2, QMC::AccessPublic, QMetaType::Void, {{ { 0x80000000 | 3, 4 }, }}), }; QtMocHelpers::UintData qt_properties { }; QtMocHelpers::UintData qt_enums { }; return QtMocHelpers::metaObjectData<QwtPlotPicker, qt_meta_tag_ZN13QwtPlotPickerE_t>(QMC::MetaObjectFlag{}, qt_stringData, qt_methods, qt_properties, qt_enums); } Q_CONSTINIT const QMetaObject QwtPlotPicker::staticMetaObject = { { QMetaObject::SuperData::link<QwtPicker::staticMetaObject>(), qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13QwtPlotPickerE_t>.stringdata, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13QwtPlotPickerE_t>.data, qt_static_metacall, nullptr, qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN13QwtPlotPickerE_t>.metaTypes, nullptr } }; void QwtPlotPicker::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { auto *_t = static_cast<QwtPlotPicker *>(_o); if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: _t->selected((*reinterpret_cast<std::add_pointer_t<QPointF>>(_a[1]))); break; case 1: _t->selected((*reinterpret_cast<std::add_pointer_t<QRectF>>(_a[1]))); break; case 2: _t->selected((*reinterpret_cast<std::add_pointer_t<QList<QPointF>>>(_a[1]))); break; case 3: _t->appended((*reinterpret_cast<std::add_pointer_t<QPointF>>(_a[1]))); break; case 4: _t->moved((*reinterpret_cast<std::add_pointer_t<QPointF>>(_a[1]))); break; default: ; } } if (_c == QMetaObject::IndexOfMethod) { if (QtMocHelpers::indexOfMethod<void (QwtPlotPicker::*)(const QPointF & )>(_a, &QwtPlotPicker::selected, 0)) return; if (QtMocHelpers::indexOfMethod<void (QwtPlotPicker::*)(const QRectF & )>(_a, &QwtPlotPicker::selected, 1)) return; if (QtMocHelpers::indexOfMethod<void (QwtPlotPicker::*)(const QVector<QPointF> & )>(_a, &QwtPlotPicker::selected, 2)) return; if (QtMocHelpers::indexOfMethod<void (QwtPlotPicker::*)(const QPointF & )>(_a, &QwtPlotPicker::appended, 3)) return; if (QtMocHelpers::indexOfMethod<void (QwtPlotPicker::*)(const QPointF & )>(_a, &QwtPlotPicker::moved, 4)) return; } } const QMetaObject *QwtPlotPicker::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *QwtPlotPicker::qt_metacast(const char *_clname) { if (!_clname) return nullptr; if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13QwtPlotPickerE_t>.strings)) return static_cast<void*>(this); return QwtPicker::qt_metacast(_clname); } int QwtPlotPicker::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QwtPicker::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 5) qt_static_metacall(this, _c, _id, _a); _id -= 5; } if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 5) *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); _id -= 5; } return _id; } // SIGNAL 0 void QwtPlotPicker::selected(const QPointF & _t1) { QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1); } // SIGNAL 1 void QwtPlotPicker::selected(const QRectF & _t1) { QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1); } // SIGNAL 2 void QwtPlotPicker::selected(const QVector<QPointF> & _t1) { QMetaObject::activate<void>(this, &staticMetaObject, 2, nullptr, _t1); } // SIGNAL 3 void QwtPlotPicker::appended(const QPointF & _t1) { QMetaObject::activate<void>(this, &staticMetaObject, 3, nullptr, _t1); } // SIGNAL 4 void QwtPlotPicker::moved(const QPointF & _t1) { QMetaObject::activate<void>(this, &staticMetaObject, 4, nullptr, _t1); } QT_WARNING_POPand the .h file:
#ifndef QWT_PLOT_PICKER_H #define QWT_PLOT_PICKER_H #include "qwt_global.h" #include "qwt_picker.h" #include "qwt_axis_id.h" class QwtPlot; class QPointF; class QRectF; #if QT_VERSION < 0x060000 template< typename T > class QVector; #endif /*! \brief QwtPlotPicker provides selections on a plot canvas QwtPlotPicker is a QwtPicker tailored for selections on a plot canvas. It is set to a x-Axis and y-Axis and translates all pixel coordinates into this coordinate system. */ class QWT_EXPORT QwtPlotPicker : public QwtPicker { Q_OBJECT public: explicit QwtPlotPicker( QWidget* canvas ); virtual ~QwtPlotPicker(); explicit QwtPlotPicker( QwtAxisId xAxisId, QwtAxisId yAxisId, QWidget* ); explicit QwtPlotPicker( QwtAxisId xAxisId, QwtAxisId yAxisId, RubberBand rubberBand, DisplayMode trackerMode, QWidget* ); virtual void setAxes( QwtAxisId xAxisId, QwtAxisId yAxisId ); QwtAxisId xAxis() const; QwtAxisId yAxis() const; QwtPlot* plot(); const QwtPlot* plot() const; QWidget* canvas(); const QWidget* canvas() const; Q_SIGNALS: /*! A signal emitted in case of QwtPickerMachine::PointSelection. \param pos Selected point */ void selected( const QPointF& pos ); /*! A signal emitted in case of QwtPickerMachine::RectSelection. \param rect Selected rectangle */ void selected( const QRectF& rect ); /*! A signal emitting the selected points, at the end of a selection. \param pa Selected points */ void selected( const QVector< QPointF >& pa ); /*! A signal emitted when a point has been appended to the selection \param pos Position of the appended point. \sa append(). moved() */ void appended( const QPointF& pos ); /*! A signal emitted whenever the last appended point of the selection has been moved. \param pos Position of the moved last point of the selection. \sa move(), appended() */ void moved( const QPointF& pos ); protected: QRectF scaleRect() const; QRectF invTransform( const QRect& ) const; QRect transform( const QRectF& ) const; QPointF invTransform( const QPoint& ) const; QPoint transform( const QPointF& ) const; virtual QwtText trackerText( const QPoint& ) const QWT_OVERRIDE; virtual QwtText trackerTextF( const QPointF& ) const; virtual void move( const QPoint& ) QWT_OVERRIDE; virtual void append( const QPoint& ) QWT_OVERRIDE; virtual bool end( bool ok = true ) QWT_OVERRIDE; private: class PrivateData; PrivateData* m_data; }; #endifWhat's wrong please?