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 | [email protected] | 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 _______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
