KUser -> kdecore

Zack Rusin zack at kde.org
Fri Sep 19 02:34:37 BST 2003


On Thursday 18 September 2003 18:52, Ravikiran Rajagopal wrote:
> On Thursday 18 September 2003 05:36 pm, Tim Jansen wrote:
> > I'de like to move the class KUser to kdecore. You can currently
> > find it in kdenetwork/krfb/srvloc/
> > (http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdenetwork/krfb/srvloc/).
> >
> > The class offers a object-oriented interface to the getuid(2),
> > geteuid(2) and getpwnam(3) POSIX functions and is able to parse
> > GECOS fields correctly.

I like the idea.

> I'd like to see this moved as well, as I use something similar in
> ksplashml. Why does it use a pimpl? [1] As a general rule, I'd prefer
> that we not use pimpls unless necessary as operator new can be
> expensive.

1) It's obviously necessary. (and It's the "d-pointer" in KDE, not 
pimpl )
2) Everything can be expensive and new is definitely not even close to 
being a problem when used for this purpose.

> [1] The only reasons I can think of are thread safety and rollback
> semantics if operator new throws an exception. 

BC? Minimizing compile-time dependencies?

> However, those would  require a little more effort, and we don't worry 
> about such things in KDE anyway.

Neither this class, nor most of KDE is exception safe, but it doesn't 
mean we don't worry about it. We just didn't form a clear strategy on 
how to handle oom and exceptions, especially that we're mostly not 
using the latter.

Zack

-- 
Instructions should be read first, or not at all.
Anything else is admitting defeat...




More information about the kde-core-devel mailing list