Skip to content

Commit 9d3059b

Browse files
committed
Do not redefine operator macros, just fix the QT_OVERLOAD_MACRO to work with simplecpp
1 parent f87ca86 commit 9d3059b

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

generator/qtscript_masterinclude.h

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,30 +113,9 @@
113113

114114

115115
#if QT_VERSION >= 0x060700
116-
// override Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE et al to return something the parser understands:
117-
#include <QtCore/qcomparehelpers.h>
118-
#define Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE, ...) \
119-
friend bool operator==(const TYPE& lhs, const TYPE& rhs); \
120-
friend bool operator!=(const TYPE& lhs, const TYPE& rhs); \
121-
friend bool operator< (const TYPE& lhs, const TYPE& rhs); \
122-
friend bool operator<=(const TYPE& lhs, const TYPE& rhs); \
123-
friend bool operator> (const TYPE& lhs, const TYPE& rhs); \
124-
friend bool operator>=(const TYPE& lhs, const TYPE& rhs);
125-
126-
#define Q_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE(TYPE) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE)
127-
#define Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE(TYPE) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE)
128-
129-
#define Q_DECLARE_STRONGLY_ORDERED(TYPE, ...) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE)
130-
#define Q_DECLARE_WEAKLY_ORDERED(TYPE, ...) Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE)
131-
#define Q_DECLARE_PARTIALLY_ORDERED Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(TYPE)
132-
133-
#define Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(TYPE, ...) \
134-
public: \
135-
bool operator==(const TYPE& rhs) const; \
136-
bool operator!=(const TYPE& rhs) const; \
137-
private:
138-
139-
#define Q_DECLARE_EQUALITY_COMPARABLE(TYPE, ...) Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(TYPE)
116+
117+
// adjust macro to work with simplecpp
118+
#define QT_OVERLOADED_MACRO(MACRO, ...) QT_OVERLOADED_MACRO_IMP(MACRO, QT_VA_ARGS_COUNT(__VA_ARGS__))(__VA_ARGS__)
140119

141120
#endif
142121

0 commit comments

Comments
 (0)