Files
qt-creator/share/qtcreator/cplusplus
Christian Kandeler 53b4d6975d C++: Fix highlighting Q_PROPERTY with template types
We override the Q_PROPERTY macro in our own header. This appears to have
two effects:
  1) The macro arguments are properly highlighted.
  2) There is no completion from libclang for Q_PROPERTY, meaning our
     own helpful snippet is the only completion candidate.
I don't understand the reason for either of these; they seem to be more
or less random effects of parsing peculiarities.

As it turns out, our macro redefinition breaks if the type of the
property is based on a template class, leading to false errors in the
code model. Removing our macro redefinition fixes the code model, but
also removes the aforementioned effects. Turning the macro into a
variadic macro fixes the code model and keeps effect 1), but not effect
2). Therefore, we also update the snippet to provide an extra string
that makes it clear this it's a helpful snippt, rather than just a
normal completion.

Fixes: QTCREATORBUG-24243
Change-Id: I4044d5e633af3ebdba36032d5efd3333b5a36214
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-07-08 14:41:11 +00:00
..