4.2 feature targets
Guillaume Pothier
gpothier at gmail.com
Tue Oct 21 01:05:00 CEST 2008
2008/10/20 Aaron J. Seigo <aseigo at kde.org>:
> On Monday 20 October 2008, Guillaume Pothier wrote:
>> Plasma::Corona::self()->viewportGeometry(id),
>> we're done (we need that singleton as popupPosition can't have a ref
>> to the corona, at least at first sight).
>
> a singleton isn't really possible without some nasty trickery (e.g. create an
> object of the subclass, register it with a static method in Corona ... ugh).
Kephal does something like that, if I understand correctly, in the
abstract Screens class. The constructor of Screen initializes the
static field, and as a single instance of the concrete subclass is
ever created, there is no problem. Or do I miss something?
g
More information about the Plasma-devel
mailing list