File Templates wizard

Milian Wolff mail at milianw.de
Sun Dec 23 13:39:03 UTC 2012


On Sunday 23 December 2012 10:48:44 Andreas Pakulat wrote:
> Hi,
> 
> just happened to try the new template wizard for files to verify an
> old report of mine, looks very nice in general. I've generated a
> QObject subclass with it and found a few points which I'd like to
> verify are not intentionally this way before filing bugs:
> 
> - "Qt Object" does not seem like a good description, a Qt object could
> also be a QWidget subclass, or QString subclass. Just call it what it
> is, QObject subclass?

+1

> - it looks like the option to add function declarations has gone
> missing, the 'class members' page allows to add some strings but at
> least for QObject they're seemingly interpreted as properties. I also
> noticed that if I do specify a return type for the 'function' its not
> included in the generated file at all. Since supporting this is quite
> complex, maybe just drop the possibility and let the user write
> declarations in the source file?

Hm the page which offers you to override functions should be still there - is 
it not? But we never had a page to add arbitrary functions afaik.

And class members is for data members. This page be useful if it could handle 
getters/setters as well (which is theoretically possible). We should 
reevaluate and eventually merge the getter/setter review request...

> - There is always a private-class generated which I think is confusing
> and unecessary in most of the use-cases. Private classes are necessary
> when doing library development, but for normal apps there's no need
> for the indirection. Maybe add an option for this or drop it
> completely, people knowing about private-classes will know how to add
> them themselves?

I thought there was an extra pimpl'ed file template - looks like I really need 
to reevaluate all these templates...

> - The generated include in my case is a path relative to the project
> directory. This might be related to using the custom-buildsystem
> manager, but then I would've expected at least getting the absolute
> path from the manager there. Ideally though it would just be
> <qobject.h>.

True. We'll need to check whether this also happens with CMake and fix it then 
either centrally or in the build system manager.

> - The page to select which functions to generate/override is taking
> quite some time before its showing any content. The first time I was
> about to skip the page because I thought this was broken. An indicator
> that KDevelop is doing something would be good inside the page itself.

Oh, I never noticed that. But since it waits for DUChain parsing to finish it 
can of course happen. Thus, showing a progress bar would be a very good idea.

> Comments/Opinions?
> 
> There also seems to be no component for the plugin, forcing one to
> file bugs under the general component.

Just created a "templates" component for kdevplatform.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121223/c67c2179/attachment.sig>


More information about the KDevelop-devel mailing list