[Qt-creator] Refactor > generate missing property members Crunchiness
Leander Schulten
leander.schulten at rwth-aachen.de
Wed May 12 16:30:57 CEST 2021
1. You mean the function body? There is a setting for that in the QtC 4.15. See the Quickfixes section at https://www.qt.io/blog/qt-creator-4.15-whats-new-in-c-support-0 <https://www.qt.io/blog/qt-creator-4.15-whats-new-in-c-support-0>
2. You can Quickfix the class name and select “Move all Functions to the cpp file”. Or change the setting so that the function is generated in the cpp file.
> I seem to have discovered a bug in the auto-completion of the Q_PROPERTY(type name ...) generation. If you tab though and loop back around, when I "generated missing property members", it generated them with "x" as the type - an actual x, and not the type in the Q_PROPERTY statement
Does this also happens in QtC 5.15?
> On 12. May 2021, at 16:20, Jason H <jhihn at gmx.com> wrote:
>
> 1. I love that QtC can "Generate missing property members"
> But I don't love that it generates the function definition in the .h file
>
> 2. I love that QtC can "Move the definition to the .cpp file"
> But I don't love that it drops you into the .cpp file. Then I have to go back to the file and repeat. Given that a property typically has a getter and a setter, I am doing this twice for each proeprty.
>
>
> 1&2 could be fixed by a variety of resolutions:
> a. "Generate missing property members" automatically generating them in the .cpp file
> b. add "Generate missing property members in .cpp" option
> c. minimally, just leaving me in the .h file
>
> I seem to have discovered a bug in the auto-completion of the Q_PROPERTY(type name ...) generation. If you tab though and loop back around, when I "generated missing property members", it generated them with "x" as the type - an actual x, and not the type in the Q_PROPERTY statement
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20210512/5e977a79/attachment.html>
More information about the Qt-creator
mailing list