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

stating the argument type in W_SIGNAL for a non overloaded function results in a warning in clang #8

Closed WSoptics closed 7 years ago

WSoptics commented 7 years ago

warning: 'qOverload' was marked unused but was used [-Wused-but-marked-unused] see same example as in #7 using clang as the compiler

ogoffart commented 7 years ago

The definition of qOverload is in Qt itself. And it is undeed maked a "unused" in order to avoid warnings when it is not used, which is most of the time.

See also this email: http://lists.qt-project.org/pipermail/development/2014-March/016181.html

This warning does not make much sense and I recommand you add -Wno-used-but-marked-unused to your build systemp to disable this warning.

Otherwise, it is a bug in Qt anyway as qOverload is a Qt feature.

WSoptics commented 7 years ago

thank you for your quick reply.
i think you are right about the warning, this seems to be more of a clang/ qt issue.