From kde-core-devel Sun Feb 27 22:03:46 2005 From: Michael Reiher Date: Sun, 27 Feb 2005 22:03:46 +0000 To: kde-core-devel Subject: Re: dcop incompatibility? Message-Id: <200502272303.46726.michael.reiher () gmx ! de> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110954171927430 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