This week end I started to implement a script which allows to convert old connect api to new qt5 connect api (see http://qt-project.org/wiki/New_Signal_Slot_Syntax)

So it’s still in progress and it’s not perfect.

It will search variable from ui file, look at current class from .h file and parses connect line.

It will convert to new api.

But after that you need to verify if it compiles.

It will failed when slot is protected, or when there is “overloads”

I was able to port a lot of connect in kdepim*.

I will continue to improve this script. There is still a lot of work to do

Trackback

4 comments untill now

  1. David Edmundson @ 2014-08-12 11:37

    I used a lot of your scripts when porting Gwenview last week.

    I just wanted to say keep up the good work, it’s fantastic and really really useful.

  2. @David: Great to see that my scripts helped you :) I will continue to improve them and create new one when necessary.

    Thanks.

  3. Hi, I wrote a similar tool (based on clang) a few months ago. However I didn’t feel it was quite ready yet. It can be found here: https://github.com/a-richardson/convert2qt5signalslot

    Have not yet compared it to your script, but being based on clang it should hopefully catch more corner cases (see testcases and issues)

  4. @Alex: Ok I will look at it. But indeed if it’s based on clang it will catch more code. For the moment I don’t have good clang version to test it. I hope that new opensuse will provide it.

Add your comment now