d1vanov / QEverCloud

Unofficial Evernote Cloud API for Qt 5.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider generating types as QObject subclasses with data members declared as Q_PROPERTY

d1vanov opened this issue · comments

The advantage of doing so would be to enable introspection - it would be easy to e.g. loop over the struct's properties in order to do anything with them - print them, compare them for equality etc.

Since types are autogenerated, the code change to implement this idea would belong to QEverCloudGenerator project.

Actually, instead of subclassing QObject QEverCloud's types can have Q_GADGET macro in their declaration.

Should also do the similar thing for enums - add Q_ENUM_NS declaration for each of them. However, need to combine it with preprocessor check for Qt >= 5.8.

Done in master and development branches.