[cfe-dev] The QtReslot Clang plugin

Laszlo Nagy via cfe-dev cfe-dev at lists.llvm.org
Thu Feb 16 00:26:48 PST 2017


Hey all,

would it make sense to add these tools to the External Clang Examples
<https://clang.llvm.org/docs/ExternalClangExamples.html> page? Which is a
file in the `docs` directory of the Clang repo.

Regards,
Laszlo

On Thu, Feb 16, 2017 at 4:55 AM, Sérgio Martins via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> On Tue, Feb 14, 2017 at 7:33 PM, Richard Braun via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> > Hello,
> >
> > During work on an internal Qt-based project at Novasys-Ingenierie,
> > a Clang plugin was written to convert string-based signals and slots
> > to the Qt5 syntax. The plugin has since been pushed to Github [1]
> > in the hope it will be useful to others facing similar issues.
>
> Hi Richard,
>
> Beware that the new PMF syntax is not a drop in replacement for the old
> style.
> Applying these fixits on a codebase might introduce bugs.
>
> Here's some things to watch out for:
>
> - You can't disconnect with new-syntax if the connect was made with
> old-syntax (and vice-versa)
> - Difference in behaviour when calling slots of partially destroyed
> objects (explained in <https://codereview.qt-project.org/#/c/83800>,
> not sure if it will be merged. <- Thiago ??)
> - Old style is capable of making functions "virtual" without using the
> virtual keyword.
>
>
> Just for fun, can you run your plugin on clazy's unit-tests
> (clazy/tests/old-style-connect/*.cpp) and compared them to
> *fixed.cpp.expected, to see if it converted the connects correctly ?
>
>
> Regards,
> Sérgio Martins
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170216/4684c396/attachment.html>


More information about the cfe-dev mailing list