woboq / verdigris

Qt without moc: set of macros to use Qt without needing moc
https://woboq.com/blog/verdigris-qt-without-moc.html
GNU Lesser General Public License v3.0
643 stars 60 forks source link

Move possibly conflicting macros to separate file #77

Closed fiesh closed 4 years ago

fiesh commented 4 years ago

This moves the macro W_PROPERTY as well as its accompanying macros WRITE, READ, NOTIFY, RESET, MEMBER, CONSTANT, and FINAL to a separate file wproperty.h.

This is done because these macros tend to conflict with other code. Separating them makes it possible to omit their definitions.

This is necessarily a breaking change as code using these macros will now need to include wproperty.h.

CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

fiesh commented 4 years ago

This should supersede #32.

fiesh commented 4 years ago

You have signed the CLA for woboq/verdigris -- I don't understand why the license/cla test claims it's still unsigned.

ogoffart commented 4 years ago

Thanks for your contribution!

However, i think it is better not to add a new file for that. First of all, i want to avoid breaking changes. and also it is not ergonomic.

Instead, i have put these macro in a #ifndef W_NO_PROPERTY_MACRO block This way, you can define the W_NO_PROPERTY_MACRO macro in your .pro file, and the offensive macro won't be defined.

See commit 24af648aeb59c0ab06966fcfe9bcc246729c6153

I hope this solve your problem.