[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: KInstance problems
From: Carsten Pfeiffer <carpdjih () cetus ! zrz ! TU-Berlin ! DE>
Date: 1999-10-28 22:17:30
[Download RAW message or body]
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?
Cheers,
Carsten Pfeiffer
--
http://www.geocities.com/SiliconValley/1632/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic