[Panel-devel] engines, applets and timing

Michael Olbrich michael.olbrich at gmx.net
Sun Sep 16 18:14:58 CEST 2007


On Sun, Sep 16, 2007 at 09:36:37AM -0600, Aaron J. Seigo wrote:
> On Sunday 16 September 2007, Michael Olbrich wrote:
> > 3)
> > in DataContainer::connectVisualization d->relayObjects[visualization]
> > was not set for (updateInterval >=3D1)
> 
> are you sure? it's set in DataContainer::Private::signalRelay, is it not?

You are right, I missed that.

> > and related to that fix:
> > QObject* DataContainer::Private::signalRelay
> > to
> > SignalRelay* DataContainer::Private::signalRelay
> >
> > to avoid casting
> 
> there is a reason the SignalRelay class is in a _p.h file ;) external usage of 
> this class should not need to know about SignalRelay at all

Well, I agree that DataContainer::signalRelay should return QObject*.
DataContainer::Private::signalRelay is imho a different matter. But it
doesn't really matter now. The reason why I introduced it is gone
anyways.


> > 4)
> > it's not possible to disconnect during QObject::destroyed()
> 
> sure it is; well at least it doesn't crash doing so ... and the real issue for 
> calling disconnectVisualization on destroyed() is to remove the SignalMapper 
> from our data structures. QObject disconnect()s automatically on destruction 
> (obviously) but DataContainer needs to remove it from its record keeping
> 
> > checking the sender is a bit ugly but I didn't feel like writing an
> > extra slot?
> 
> except that now you've made it impossible to call disconnectVisualization 
> directly. this part of the patch is wrong.

I don't think you understood that part.
Calling disconnectVisualization on destroyed() is fine, but calling
disconnect() in disconnectVisualization when it is called on destroyed()
is not. It does not do anything but print an ugly warning.
(sender() != visualization) is currently only false when
disconnectVisualization is called on destroyed(). When
disconnectVisualization is called directly sender() is 0 and disconnect
is called.

I will commit commit the parts of the patch without objections.

michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070916/8cdbd804/attachment.pgp 


More information about the Panel-devel mailing list