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

List:       kde-core-devel
Subject:    slots and dcopobjects
From:       Antonio Larrosa <antlarr () arrakis ! es>
Date:       2000-08-02 18:37:36
[Download RAW message or body]

Hi,

I've just suffered from some problems that I think that may be related
to some QObject's stuff.

I was adding a dcop iface to KMid, so I did this:

class KMidFrame : public KMainWindow, virtual public KMidIface
{ ... };

There's a pure virtual KMidIface::play() method which is implemented
in KMidFrame::play().

The problem is that if I connect a signal (from a KAction, for example)
to the KMidFrame::play() slot something bad happens. Where something bad
means that triggering that action causes a core dump, although the
dcop interface works well.

I suppose it's because QObject objects don't like to be related in any
way to the second class when multiple inheriting, even if the methods
are pure virtual.

Just removing the multiple inheritance makes things work again from 
the user interface.

So the moral seems to be :
Don't connect signals to slots which are also "dcop slots".

Please tell me that I'm wrong :)

Greetings,

--
Antonio Larrosa Jimenez
KDE Core developer
antlarr@arrakis.es        larrosa@kde.org
http://www.arrakis.es/~rlarrosa
KDE - The development framework of the future, today.

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

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