[PATCH] KUser and new class KGroup

Alexander Neundorf neundorf at kde.org
Sat Jun 5 10:07:48 BST 2004


On Friday 04 June 2004 19:13, Jan Schäfer wrote:
> On Friday 04 June 2004 14:42, Simon Hausmann wrote:
...
> > Probably because it actually is much less common for applications to
> > need/use than it appears :) .
> >
> > Actually, what other use-cases are you thinking of?
>
> I mean, if there is KUser why shouldn't there be KGroup?
> A grep for 'struct group' in my KDE CVS (does not have all subdirs though)
> gives the following possibilities of using KGroup:
>
> kdeadmin/kdat/FileInfoWidget.cpp
> kdeadmin/kuser/kgroup.cpp  <-- this is another KGroup implementation
> kdebase/kdm/kfrontend/kgreeter.cpp
> kdebase/kioslave/nfs/kio_nfs.cpp
> kdebase/kioslave/smb/kio_smb_browse.cpp
> kdebase/kcontrol/kdm/main.cpp
> kdebase/kcontrol/kfontinst/kio/KioFonts.cpp
> kdelibs/kio/kio/chmodjob.cpp
> kdelibs/kio/kio/kfileitem.cpp
> kdelibs/kio/kio/karchive.cpp
> kdelibs/kio/kfile/kpropertiesdialog.cpp
> kdelibs/kdecore/kpty.cpp
> kdelibs/kdecore/kstandarddirs.cpp
> kdelibs/kioslave/file/file.cc
>
> So I think there are enough cases where it could be used.
>
> Greetings,
>
> 	Jan

Well, I don't want to sound negative, but which advantage would the KGroup 
class offer over 
struct group gr=getgrname(name)/getgrid(gid); ?
This seems to be basically the two calls which are used in these places, not 
hard to understand, easy to use, well known UNIX API. 
Wrapping a class around it adds another layer, which means overhead (not 
much), another layer which can have bugs and another new API to learn.

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list