How to enter an email address
Rolf Eike Beer
kde at opensource.sf-tec.de
Sun Oct 24 19:22:24 BST 2010
Ingo Klöcker wrote:
> On Tuesday 12 October 2010, Rolf Eike Beer wrote:
> > Ingo Klöcker wrote:
> > > On Saturday 09 October 2010, Christoph Feck wrote:
> > > > On Friday 08 October 2010 20:37:04 Rolf Eike Beer wrote:
> > > > > Hi,
> > > > >
> > > > > I was just wondering if there is a simple _and_ correct
> > > > > solution for an "enter an email address" widget. In KGpg I use
> > > > > a simple KLineEdit and
> > > >
> > > > I think the simplest is probably using QRegExpValidator. Google
> > > > should know a correct "email regexp".
> > >
> > > I suggest reading "I Knew How To Validate An Email Address Until I
> > > Read The RFC"
> > > http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-ema
> > > il- address-until-i.aspx
> > >
> > > Afterward you will hopefully agree that you should use what our
> > > experts in this field provide in kdepimlibs instead of trying to
> > > come up with a suboptimal solution involving a regular expression.
> >
> > Yes, of course. That's why I asked at all: when 3 developers will do
> > it their own way at least 4 different bugs will appear.
> >
> > What about putting that validator class in kdelibs and just using it
> > from kdepimlibs (with respect to BC)? Otherwise the "simple
> > fallback" would have to be either too permissive (as being too
> > strict would be a user experience nightmare) or a copy of that class
> > anyway (with the downside that every change always has to be done
> > twice).
>
> I'm not sure moving it to kdelibs is such a good idea. kdepimlibs is a
> much more natural place to look for such functionality.
>
> Moreover, I think the validator has extremely limited use. Most people
> will want to use the full-featured address line edit from kdepimlibs
> which provides auto-completion of addresses in the address book. In
> fact, even you should consider using this for KHTML because in 99.9 % of
> all cases (as usual, I made this number up) the user will have to enter
> his own email address which is already conveniently stored in his
> address book. So why should he have to enter his email address over and
> over again in all those different email input elements when auto-
> completion could make his life much easier?
Besides the fact that kdelibs then would depend on kdepimlibs (which needs
kdelibs) this doesn't sound too bad. On the other hand e.g. for KGpg I already
depend on kdepimlibs. Can you tell me how that editor class is actually named?
;)
Eike
-------------- 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/kde-core-devel/attachments/20101024/9a1d1578/attachment.sig>
More information about the kde-core-devel
mailing list