dcop incompatibility?

Michael Reiher michael.reiher at gmx.de
Sun Feb 27 22:03:46 GMT 2005


On Sunday 27 February 2005 17:06, Waldo Bastian wrote:
> On Sunday 27 February 2005 13:36, Michael Reiher wrote:
> > Hi!
> >
> > The old Kwintv uses:
> >
> >   QByteArray data;
> >   m_bHaveKDESaver = kapp->dcopClient()->findObject("kdesktop",
> >                                                    "KScreensaverIface",
> >                                                    "enable(bool)",
> >                                                    data,
> >                                                    m_screenSaverApp,
> >                                                    m_screenSaverObj);
> >
> > to detect whether there is a KDE screensaver available. This used to work
> > fine. But recently I noticed, that it obviously doesn't anymore(and thus
> > the screensaver, isn't disabled anymore). findObject() apparently doesn't
> > return true anymore, even though the dcop object exists. So, has
> > dcop/dcopclient changed in an incompatible way?
>
> The above snippet suggests that you call a function that takes a bool as
> argument, but you don't seem to pass any arguments at all to it. I think
That's right. The purpose was just to find out, whether such an object, having 
such a function exists.

> DCOP now catches that case and fails. Previously it could crash in such
> situation (with types other than bool).
>
Ah, ok. Although I wonder how should I achieve the above, without actually 
calling that function (which is what the name findObject() suggests;)?? OTOH, 
even though this looks indeed like a kwintv bug, the question is whether 
other applications rely on this specific behavior? Shouldn't it simply return 
true if the argument is empty, in order to keep the current behavior until 
KDE4? For the particular case of kwintv, I doubt it makes sense to fix it, as 
it basically dead, though still used propbaly...

Greets Michael




More information about the kde-core-devel mailing list