How to enter an email address
Ingo Klöcker
kloecker at kde.org
Sun Oct 24 20:11:15 BST 2010
On Sunday 24 October 2010, Rolf Eike Beer wrote:
> 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.
IMHO this is an indicator that the distribution of libraries in kdelibs
and kdepimlibs is rather random and suboptimal. Possible solutions are
splitting kdelibs and kdepimlibs into smaller logical collections of
libraries (which would certainly be welcome by those trying to make
kdelibs fit for smart phones and the like) or moving parts (or even all)
of kdepimlibs to kdelibs. I'd very much prefer the first solution or a
combination of both, i.e. a single SC package including well separated
collections of KDE's base libraries (similar to kdebase/*).
> On the other hand e.g.
> for KGpg I already depend on kdepimlibs. Can you tell me how that
> editor class is actually named? ;)
http://api.kde.org/4.x-api/kdepimlibs-
apidocs/kabc/html/classKABC_1_1AddressLineEdit.html
Regards,
Ingo
-------------- 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/02dc1c18/attachment.sig>
More information about the kde-core-devel
mailing list