Zwabel’s Weblog

February 13, 2009

KDevelop4: Creating a Qt slot, the cool way

Filed under: KDE,KDevelop — zwabel @ 10:52 pm

In an earlier blog-post I’ve already written about automatic signal/slot matching and completion(See this). The code-completion box shows you the appropriate connectable signals and slots, and also shows exactly what signals match what slots. Now what if you have a signal, and you know want to connect to it, but you don’t have a matching slot yet? In the last days, I’ve implemented a new feature, that allows automatically creating a matching slot with the typed name, exactly matching the signature of the connected signal.

See this example:
signal_slot_completion

A signal is being connected, but there is no perfectly matching slot(Or maybe you want another one). Now you can just continue typing, and you will see this item in the list:
signal_slot_completion_creation
Now when you execute this completion-item, KDevelop will automatically create the slot within the declaration of the local class, and will nicely complete the current connect(..) call, pointing a the new slot:
signal_slot_completion_creation_ready
Here you see the declaration that was created within the header-file:
signal_slot_completion_creation_ready_declaration

Together with the implementation-helpers, this will allow really rapid programming: Just pick your signal from somewhere, let KDevelop create the declaration and finish the connect(..), go to the place in the source-file where you want to implement the slot, and let the implementation-helper create a stub declaration for you.πŸ™‚

Development update
Except for this, I’ve mainly done smaller bug- and crash-fixes since my last blog.
One interesting development is that Hamish Rodda has started fixing up our old version of the integrated debugger, which is nearly a straight port from KDevelop3, so we might have a usable debugger soon. He’s doing it in a branch. The debugger that is in trunk has some additional interesting features like hover-tooltips, and internal refactoring has happened since the original maintainer considers the code of the old debugger a mess, but suffers from the fact that it doesn’t properly work, and seems to be quite a bit away from it, at least that’s what those who tried to fix it found out.

5 Comments »

  1. Fantastic! KDevelop4 is going to be the IDE of choice for a hell of a lot of people when it comes out, thanks to unprecedented features like this. Beautiful work.πŸ™‚

    Comment by clinton — February 14, 2009 @ 12:07 am

  2. Do you sleep? You’ve done a fantastic job. Until recently KDevelop4 always crashed when I tried to do anything productive with it. This morning I tried it on Fedora 10, and was able to get some work done. The polish and professionalism is starting to emerge and I am getting very excited for the prospects of this IDE. The code completion is probably the most powerful implementation I’ve ever seen. However it sometimes gets to be a little confusing. For example what is “Depth 1”. This may just be a learning curve thing though. In any case I just wanted to thank you and the rest of the team for your efforts.

    ~AhmedG.

    Comment by AhmedG — February 14, 2009 @ 4:43 am

  3. Yeah, KDevelop4 is a phantastic IDE for C/C++ development. I very-very like it.

    Comment by hrongyorgy — February 14, 2009 @ 8:23 am

  4. you guys absolutely rock. kdevelop 4 is progressing at a very, very impressive pace.

    keep up your excellent work!

    Comment by Erlend — February 14, 2009 @ 11:57 am

  5. Wow, Kdevelop4 is becoming fantastic! Have you achieved a way to make Kdevelop4 develop by itself or what?

    Comment by CSousa — February 14, 2009 @ 1:59 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: