It means that there should be no bitcoin address specific code in the
"generic" class QValidatedLineEdit, but it should call into a validator
object to do the validation. This keeps the code general.

A policy class is a class such as QValidator subclasses that implements one
aspect, in this case validation, and can be plugged into another object (a
QLineEdit or QValidatedLineEdit, in this case).



On Fri, Dec 20, 2013 at 11:36 AM, P. Kaufmann <notifications@github.com>wrote:

> In src/qt/qvalidatedlineedit.cpp:
>
> > @@ -37,6 +41,34 @@ void QValidatedLineEdit::focusInEvent(QFocusEvent *evt)
> >      QLineEdit::focusInEvent(evt);
> >  }
> >
> > +void QValidatedLineEdit::focusOutEvent(QFocusEvent *evt)
> > +{
> > +    // Second check is true if no validator was set or,
> > +    // if set, the input is valid.
> > +    if (text().isEmpty() || hasAcceptableInput())
> > +    {
> > +        // If used with BTC addresses an additional check can be enabled
> > +        // via setCheckAddress(true), default is false.
>
> Can you please explain what a separate policy means in that context? I'd
> like to finish this soon :).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/bitcoin/bitcoin/pull/3286/files#r8496583>
> .
>