[Kmymoney-devel] SVN commit 1086413

Thomas Baumgart thb at net-bembel.de
Sun Feb 7 15:42:11 CET 2010


On Sunday 07 February 2010 15:17:46 Fernando Vilas wrote:
> On Sunday 07 February 2010 04:25:14 Thomas Baumgart wrote:
> > SVN commit 1086413 by tbaumgart:
> >
> > Renamed setHint() to setClickMessage()
> > Replaced own logic with standard KLineEdit::setClickMessage()
>
> [...]
>
> > -void KMyMoneyCombo::setHint(const QString& hint) const
> > +void KMyMoneyCombo::setClickMessage(const QString& hint) const
> >  {
> >    if (m_edit)
> > -    m_edit->setHint(hint);
> > +    m_edit->setClickMessage(hint);
> >  }
>
> [...]
>
> The function KLineEdit::setClickMessage is non-const, since it is
> (logically) a mutating function. We should probably follow the same format.
> Other than that, it looks like we save a lot of code this way.

In principal yes. But it leaves the Combobox untouched. Only the contained 
lineedit widget is changed. So we can safely keep it const.

Since there is no common interface between a KMyMoneyCombo and a KLineEdit it 
really doesn't matter that much.

Just my 0.02

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
"Hey! I could use Tex!" and I've only gotten to use it a little
so far but it's so far superiour to MS Words "be everywhere do
everything"-ness it's not even funny... (lordSauron)
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 224 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100207/42e3c971/attachment.sig 


More information about the KMyMoney-devel mailing list