QCustomPlot: Fix build for Qt 6.2 (QTBUG-92077).

This commit is contained in:
Nodir Temirkhodjaev 2021-03-26 14:49:40 +03:00
parent bf3b7eee3f
commit 4a54b2f367

View File

@ -145,7 +145,7 @@ class QCPBars;
It provides QMetaObject-based reflection of its enums and flags via \a QCP::staticMetaObject.
*/
#ifndef Q_MOC_RUN
#if !defined(Q_MOC_RUN) || QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
namespace QCP {
#else
class QCP { // when in moc-run, make it look like a class, so we get Q_GADGET, Q_ENUMS/Q_FLAGS features in namespace
@ -164,6 +164,8 @@ class QCP { // when in moc-run, make it look like a class, so we get Q_GADGET, Q
Q_ENUMS(SelectionRectMode)
Q_ENUMS(SelectionType)
public:
extern const QMetaObject staticMetaObject; // in moc-run we create a static meta object for QCP "fake" object. This line is the link to it via QCP::staticMetaObject in normal operation as namespace
#endif
/*!
@ -366,8 +368,6 @@ inline int getMarginValue(const QMargins &margins, QCP::MarginSide side)
}
extern const QMetaObject staticMetaObject; // in moc-run we create a static meta object for QCP "fake" object. This line is the link to it via QCP::staticMetaObject in normal operation as namespace
} // end of namespace QCP
Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::AntialiasedElements)
Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::PlottingHints)