File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed
Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ enum Q_DECLARE_METATYPE ;
Original file line number Diff line number Diff line change 1+
2+ template <typename T>
3+ struct QMetaTypeId
4+ {
5+ };
6+
7+ #define Q_DECLARE_METATYPE (TYPE ) Q_DECLARE_METATYPE_IMPL(TYPE)
8+ #define Q_DECLARE_METATYPE_IMPL (TYPE ) \
9+ template <> \
10+ struct QMetaTypeId < TYPE > \
11+ { \
12+ enum { Defined = 1 }; \
13+ static int qt_metatype_id () \
14+ { \
15+ return 1 ; \
16+ } \
17+ };
18+
19+
20+ struct S
21+ {
22+ };
23+ Q_DECLARE_METATYPE (S);
Original file line number Diff line number Diff line change 1+
2+ module test370 ;
3+
4+ import config;
5+ import cppconvhelpers;
6+ import qt.core.metatype ;
7+
8+ struct QMetaTypeId (T)
9+ {
10+ }
11+
12+ /+ #define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
13+ #define Q_DECLARE_METATYPE_IMPL(TYPE) \
14+ template <> \
15+ struct QMetaTypeId< TYPE > \
16+ { \
17+ enum { Defined = 1 }; \
18+ static int qt_metatype_id() \
19+ { \
20+ return 1; \
21+ } \
22+ }; +/
23+
24+
25+ @Q_DECLARE_METATYPE struct S
26+ {
27+ }
28+ /+ Q_DECLARE_METATYPE(S); +/
29+
You can’t perform that action at this time.
0 commit comments