Ich versuche gerade, WSJT-X auf Qt6 zu compilieren. Die
CMake-Infrastruktur habe ich soweit angepasst, aber jetzt stolpere ich
über ein MOC-generiertes File. Der Compiler beschwert sich hier über
ungültige Template-Argumente:
1 | const QMetaObject QCP::staticMetaObject = { {
|
2 | nullptr,
|
3 | qt_meta_stringdata_QCP.offsetsAndSize,
|
4 | qt_meta_data_QCP,
|
5 | nullptr,
|
6 | nullptr,
|
7 | qt_incomplete_metaTypeArray<qt_meta_stringdata_QCP_t
|
8 | , QtPrivate::TypeAndForceComplete<QCP, std::true_type>
|
9 |
|
10 |
|
11 |
|
12 | >,
|
QCP kommt aus dem Headerfile:
1 | /*!
|
2 | The QCP Namespace contains general enums, QFlags and functions used throughout the QCustomPlot
|
3 | library.
|
4 |
|
5 | It provides QMetaObject-based reflection of its enums and flags via \a QCP::staticMetaObject.
|
6 | */
|
7 | #ifndef Q_MOC_RUN
|
8 | namespace QCP {
|
9 | #else
|
10 | class QCP { // when in moc-run, make it look like a class, so we get Q_GADGET, Q_ENUMS/Q_FLAGS features in namespace
|
11 | Q_GADGET
|
12 | Q_ENUMS(ExportPen)
|
13 | Q_ENUMS(ResolutionUnit)
|
14 | Q_ENUMS(SignDomain)
|
15 | Q_ENUMS(MarginSide)
|
16 | Q_FLAGS(MarginSides)
|
17 | Q_ENUMS(AntialiasedElement)
|
18 | Q_FLAGS(AntialiasedElements)
|
19 | Q_ENUMS(PlottingHint)
|
20 | Q_FLAGS(PlottingHints)
|
21 | Q_ENUMS(Interaction)
|
22 | Q_FLAGS(Interactions)
|
23 | Q_ENUMS(SelectionRectMode)
|
24 | Q_ENUMS(SelectionType)
|
25 | public:
|
26 | #endif
|
Wenn das MOC-generierte File compiliert wird, ist irgendwie Q_MOC_RUN
nicht gesetzt, obwohl das scheinbar erwartet werden würde. Wann und wie
sollte das denn gesetzt sein?
Wenn ich das #ifdef entferne, erbricht sich das Compilieren an anderen
Stellen.
Kann mir einer kurz erklären, auch welchen Files MOC was generiert?