Page 1 of 1

CS_DECLARE_METATYPE documentation issue

Posted: Sun Jan 10 2021 9:17 pm
by seasoned_geek
/home/roland/sf_projects/redbug/src/settingsbreakpoint.h:32:42: error: extra ‘;’ [-Werror=pedantic]
32 | CS_DECLARE_METATYPE( SettingsBreakpoint );
| ^

Go here:

https://www.copperspice.com/docs/cs_api/custom-types-c.html

scroll to bottom and see this

Declaring the Type

In order to use the Message class with the property system or in a QVariant, it must be added as a MetaType. This will provide the ability to query the QVariant system for the name, which would be "Message".

To add this class to the QVariant system invoke the CS_DECLARE_METATYPE() macro in the header file where it is defined, after the class declaration.
CS_DECLARE_METATYPE(Message);

Re: CS_DECLARE_METATYPE documentation issue

Posted: Mon Jan 11 2021 7:41 am
by barbara
Thanks, we will correct the docs.