[Qt-creator] Feature Request

Nicolas Arnaud-Cormos nicolas at kdab.com
Sun Nov 22 16:39:47 CET 2009


On Thursday 19 November 2009 08:37:56 Robert Caldecott wrote:
> I'll log this on the cool new Qt tracking system but before I do I
> wanted to know if it's possible...
> 
> How cool would it be to add a new method declaration to a C++ header
> file and have Qt Creator add the method definition to the .cpp file
> automatically?  Taking this a step further, you could edit an existing
> method declaration and the definition would be changed automatically.
> It would be a big time saver IMHO.

I've coded a little plugin that does the 'almost automatic method definition 
creation' (not automatically, you need a shortcut : Ctrl+Shift+F2):
http://gitorious.org/creator-plugins

I just updated the code to the new RC (I just changed the dependency number), 
it's working for me but:
 * it doesn't detect "using namespace foo;"
 * it assumes that the C++ file exists
 * it puts the function definition at the end of the file, after the last one
 * it doesn't work with inline functions

I would like to enhance it, unfortunately I don't see me working on it anytime 
before next year.

Cheers,
Nicolas

-- 
Nicolas Arnaud-Cormos | nicolas at kdab.com | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions




More information about the Qt-creator-old mailing list