|
73 | 73 | # undef Q_CLANG_QDOC |
74 | 74 | #endif |
75 | 75 |
|
| 76 | + |
| 77 | +#if QT_VERSION >= 0x060700 |
| 78 | +// override Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE et al to return something the parser understands: |
| 79 | +#include <QtCore/qcomparehelpers.h> |
| 80 | +#define Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE) \ |
| 81 | + friend bool operator==(const TYPE& lhs, const TYPE& rhs); \ |
| 82 | + friend bool operator!=(const TYPE& lhs, const TYPE& rhs); \ |
| 83 | + friend bool operator< (const TYPE& lhs, const TYPE& rhs); \ |
| 84 | + friend bool operator<=(const TYPE& lhs, const TYPE& rhs); \ |
| 85 | + friend bool operator> (const TYPE& lhs, const TYPE& rhs); \ |
| 86 | + friend bool operator>=(const TYPE& lhs, const TYPE& rhs); |
| 87 | + |
| 88 | +#define Q_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE(TYPE) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE) |
| 89 | +#define Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE(TYPE) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE) |
| 90 | + |
| 91 | +#define Q_DECLARE_STRONGLY_ORDERED(TYPE) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE) |
| 92 | +#define Q_DECLARE_WEAKLY_ORDERED(TYPE) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE) |
| 93 | +#define Q_DECLARE_PARTIALLY_ORDERED Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE) |
| 94 | + |
| 95 | +#define Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(TYPE) \ |
| 96 | + public: \ |
| 97 | + bool operator==(const TYPE& rhs) const; \ |
| 98 | + bool operator!=(const TYPE& rhs) const; \ |
| 99 | + private: |
| 100 | + |
| 101 | +#define Q_DECLARE_EQUALITY_COMPARABLE(TYPE) Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(TYPE) |
| 102 | + |
| 103 | +#endif |
| 104 | + |
| 105 | + |
76 | 106 | // it seems this can be safely ignored (otherwise generator currently stumbles over use of noexcept): |
77 | 107 | #define Q_DECLARE_SHARED(TYPE) |
78 | 108 | #define Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(TYPE) |
|
0 commit comments