On Fri, 21 Feb 2020 at 09:24, Kai Köhne <kai.koe...@qt.io> wrote: > Hi, > > Another alternative is to actually use C++ attributes for this: > > [[qt::emit]] somethingChanged(); > > C++ attributes are required since C++11, and since C++17 the compiler is > also required to just ignore one's it doesn't know [1]. Because it is part > of the core language, It is also something every C++ IDE and tool does > accept (and could even check for) ... >
I would like the idea of using attributes for this. However, compilers are allowed to warn for unknown attributes, which is useful to detect typos. This means that we would get a warning for each usage of [[qt::emit]]. So unless there is a way to disable unknown attribute warnings for a specific set of custom attributes this will be a pain. My 2 cents Benjamin
_______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development