[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KInstance problems
From: Stephan Kulow <coolo () kde ! org>
Date: 1999-10-29 9:39:04
[Download RAW message or body]
Carsten Pfeiffer wrote:
>
> Hi,
>
> what should you do, when you need stuff from KGlobal, but you're not
> having a KApplication?
> E.g. currently you can't use KConfig without a KInstance/KApplication,
> because KConfig uses KGlobal::dirs(), which is only available when there
> is a KInstance.
>
> Should anyone needing KGlobal, KConfig and most possibly other classes
> before KApplication create a temporary KInstance itself? The destructor of
> KInstance should then set KGlobal::_instance to 0, so that the KApplication
> object can become the next KGlobal::_instance.
>
> And we'd need to have a policy: before calling any methods in kdelibs, you
> need to have either a KInstance or KApplication.
>
> Is this correct?
>
What should KGlobal::config() be when it doesn't know what name you want
to use?
The same with KLocale, KStandardDirs (which needs KConfig :) and
KIconLoader.
They all need to know the name of your application. If you need
something of these
before you have the KApplication, create a KInstance with the same name.
KInstance
is only about the name.
You're right, that the self() pattern isn't implemented properly.
Greetings, Stephan
--
As long as Linux remains a religion of freeware fanatics,
Microsoft have nothing to worry about.
By Michael Surkan, PC Week Online
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic