Custom Buildsystem Support for KDevelop4

February 19, 2010 at 10:58 pm | Posted in KDevelop | Comments Off on Custom Buildsystem Support for KDevelop4

A bit of background first:

The buildsystem we (as in froglogic) use for Squish is custom written using Javascript and that means its not very nice to use KDevelop for hacking on the code. The reason is that KDevelop4 needs to know about includes and defines from the projects buildsystem to provide proper autocompletion and code-navigation.

Now the C++ support has some a small gui which allows you to store some custom include paths in a config file inside of the project. This works for small things, but Squish is buildable on various platforms and more importantly with different dependencies (Qt3 vs. Qt4, different script interpreters, tcl/tk etc.). So I have about a handful of build directories for various configurations and hence a single in-project config file for includes doesn’t work.

Initially I wanted to write a buildsystem plugin for our Javascript buildsystem, but that was simply too much work for me. So instead I’ve sat down (since january actually) and implemented a buildsystem plugin that is supposed to support any buildsystem out there by configuring the tools, includes and defines manually. Also the build directory can be configured, everything goes into a named buildsystem configuration which can be easily changed. So I can setup a separate config for each of my builddirs.

I guess now that you’ve read this, you’re eager to try it out, huh? The plugin is hosted on as I didn’t want to start it in svn, just to convert it to git in a few months. You can find checkout instructions on the page. If you find any bugs, you can keep them, or drop me a mail (I’ll consider using KDE bugzilla once the amount is large enough).

Even if there’s not much to see for such a plugin, I created a small snapshot of the configuration widget: Custom Buildsystem Config page.

PS: I know that its currently not possible to delete entries from the project
paths, includes and defines. Working on that right now (who wants to delete there anyway??).

Writing unittests for KDevelop plugins

February 17, 2010 at 4:00 pm | Posted in KDevelop | Comments Off on Writing unittests for KDevelop plugins

After just completing a basic unit-test for a KDevelop4 plugin I’m currently working on I realized that its really easy, but we lack some simple examples how to do this.

So I sat down and added an article to our Wiki that explains how a basic unittests for a KDevelop4 plugin is structured and how it works.

Its really important that setting up the necessary environment for unittests is easy, at least thats what my personal experience has taught me. If writing a unittest for a small bug one has found takes more than a couple of minutes because of tons of extra things to write (like having to implement certain interface classes with some dummy values, or setting up a complete gui first), then those unittests will never be written. The exception might be people being paid to write those, but this is seldomly the case in open source projects.

Hence its important to make it possible to add a new test for a feature or bug in as few lines as possible, concentrating only on the particular circuumstances that are required for the bug/feature. So with the above article and the framework KDevPlatform provides, there’s really no excuse anymore for not writing unit-tests for your plugins 🙂

KDevelop4 Beta8

February 13, 2010 at 6:48 pm | Posted in KDevelop | 10 Comments

I’m pleased to announce (as first as it seems) that KDevelop4 released its 8th Beta. This is mostly a bugfix release as we are slowly (but steadily) moving towards a final release. There’s going to be another Beta soon with (hopefully) some more features as the KDevelop/Kate Sprint just started.

Additionally to kdevelop+kdevplatform you’ll find Beta’s of various php-related plugins on the KDE mirros. These plugins enable language support (code-completion and navigation), php-documentation view and debugging of php code (both standalone and inside a browser via xdebug). These are provided by Milian Wolf and Niko Sams, so join #kdevelop and give them a hug for providing such outstanding php support 🙂

For those eager to try out (and when the distro hasn’t built packages yet), you can find the files on the KDE mirrors

Create a free website or blog at
Entries and comments feeds.