On Thu, 25 Apr 2013 19:40:50 -0000
Marko Käning <mk-li...@email.de> wrote:

> 
> 
> > On April 24, 2013, 8 p.m., Thomas Baumgart wrote:
> > > kmymoney/plugins/csvexport/csvwriter.cpp, line 190
> > > <http://git.reviewboard.kde.org/r/109803/diff/4/?file=140785#file140785line190>
> > >
> > >     Here's another way to do this:
> > >     
> > >       str += QString("\"%1\",").arg(payee.name());
> > >     
> > >     Don't know which one is better.
> > 
> > Allan Anderson wrote:
> >     I'll sleep on that.
> 
> Thomas' suggestion of using arguments in strings is used in many
> places in KMM.
> 
> 
> - Marko

The original was 
str += '"' % payee.name() % '"' % ',', which, to me ,
wins on readability.

Another alternative is 
str += payee.name().prepend('"').append("\","), which is also fairly
clear.

'You pays yer money and you takes yer choice.'

Allan

_______________________________________________
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel

Reply via email to