[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KSycoca::self() method
From:       <pbrown () redhat ! com>
Date:       2000-05-31 12:32:11
[Download RAW message or body]

On Wed, 31 May 2000, David Faure wrote:

> > > should this be available in KGlobal?  It is sort of inconsistent.
> > 
> > I don't see why?
> > 
> > KGlobal is in kdecore while KSycoca is in kio (libksycoca) .
> 
> And the self pattern is used all over KDE. KTrader::self() is what is says,
> KDirWatch::self() is what it says. Moving anything related to ksycoca
> into kdecore is just nonsense.

Maybe you think so, you're the architect.  But imagine this scenario and
continue to say I'm crazy.  I'm a programmer.  I'm never going to use the
other esoteric stuff in KSycoca, all I'm interested in is updating my
application if the system database stuff changes.  For this, I have to
include a new header file, scan through the documentation in the header
(how did I even find this header at all, and what does 'sycoca' mean??),
and then do something like this:

connect(KSycoca::self(), SIGNAL(databaseChanged()), this,
SLOT(slotDoSomethingNow()));

What I'm saying is that this was NON-INTUITIVE.  However, I am already (as
a new KDE programmer) finding that there are many common things I need
available via the KGlobal class, so I would have looked there first, and
had I found this functionality, it would have saved me a bunch of time and
effort. 

-- 
  Preston Brown
  pbrown@redhat.com                                Red Hat, Inc. 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic