Review Request: Add year, name and email to license text when generating a new class

Milian Wolff mail at milianw.de
Tue Dec 7 18:35:30 UTC 2010



> On 2010-12-07 12:02:23, Milian Wolff wrote:
> > good first start and can be applied imo.
> > 
> > it would be nice to reuse KTextEditor::TemplateInterface for this though. That would require an open document though, so not sure. Probably overkill for simple licenses.
> > 
> > Alternatively using Grantlee would be awesome as well, yet again - maybe overkill :)
> > 
> > So as I said, please merge into master (if you have commit rights)
> 
> Jan Gerrit Marker wrote:
>     Great, thanks :-).
>     I noticed that I don't check if name or email address are empty, I'll add a placeholder like the one before if they are, ok?.

check that before you are trying to do the replacement, i.e. don't replace anything when the email/name/... is empty.


- Milian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100192/#review463
-----------------------------------------------------------


On 2010-12-06 21:48:16, Jan Gerrit Marker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100192/
> -----------------------------------------------------------
> 
> (Updated 2010-12-06 21:48:16)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> If you create a new class using the KDevelop code generator there will be added a license. Normally these licenses have a "<year>" and a "<copyright holder>" (or similar) in it. You have to replace this manually. This patch replaces "<year>" and "<copyright holder>" with the appropiate texts - the year is taken from QDate the name and email from KEMailSettings. The name has the format "My Name <myemail at example.com>".
> The licenses are changed to use only "<year>" and "<copyright holder>".
> 
> 
> Diffs
> -----
> 
>   language/codegen/licenses/LGPL 0b542d1 
>   language/codegen/licenses/MIT 03cadb0 
>   language/codegen/licenses/GPL 77f9410 
>   language/codegen/licenses/GPL 17dbc21 
>   language/codegen/licenses/Apache fbf1e16 
>   language/codegen/createclass.cpp 7685e03 
> 
> Diff: http://git.reviewboard.kde.org/r/100192/diff
> 
> 
> Testing
> -------
> 
> It works fine for me.
> 
> 
> Thanks,
> 
> Jan Gerrit
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20101207/d3e00ffa/attachment.html>


More information about the KDevelop-devel mailing list