Update to allow plugin to compile with recent QtCreator

Hi, 

Thought that this plugin looked useful but it didn't compile with the recent version of QtCreator that I use.

So, I added some updates so that the plugin compiles with a recent version (2.8 / 3.0) version of QtCreator.

I also added an implementation of the "add definition in source file"