Menu

cppcheck 1.90 - Q_DECLARE_METATYPE

x-flow
2020-01-02
2020-01-07
  • x-flow

    x-flow - 2020-01-02

    cppcheck 1.90 doesn't recognize Q_DECLARE_METATYPE. Isn't this in qt.cfg?

    <error msg="There is an unknown macro here somewhere. Configuration is required. If Q_DECLARE_METATYPE is a macro then please configure it." verbose="There is an unknown macro here somewhere. Configuration is required. If Q_DECLARE_METATYPE is a macro then please configure it." id="unknownMacro" severity="error"></error>

     
  • versat

    versat - 2020-01-07

    Yes it is in qt.cfg:

    <define name="Q_DECLARE_METATYPE(x)" value=""/>
    

    Does the macro usage in the code has exactly one argument? Is the Qt library configuration explicitly used for example by adding the command line option --library=qt?

     
  • x-flow

    x-flow - 2020-01-07

    Thanks. That was the problem, it wasn't configured properly. I assumed it would pick up the library automatically.

     

Log in to post a comment.