Review Request: Watch over interface changes in Solid::PowerManagement

Dario Freddi drf54321 at gmail.com
Wed Nov 18 08:28:38 GMT 2009


On Wednesday 18 November 2009 07:53:36 Kevin Ottens wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2196/#review3153
> -----------------------------------------------------------
> 
> 
> Wouldn't it work and be much simpler by using
>  QDBusAbstractInterface::isValid() instead? IIRC it's supposed to be
>  updated on name onwer change as well, so it sounds like you're reinventing
>  the wheel here.

The problem is that I'm not sure if that happens and if it's automatically 
updated: if you're sure about that, I'll just push a patch that wraps every 
call to an interface into a isValid() if.

Though, I'm not sure if that would work, I don't even know if isValid is 
reliable at all, I thought it was supposed to work on creation only. I'll try 
coding a small test later and tell you what I'll find out


> 
> - Kevin
> 
> On 2009-11-17 20:47:06, Dario Freddi wrote:
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > http://reviewboard.kde.org/r/2196/
> > -----------------------------------------------------------
> >
> > (Updated 2009-11-17 20:47:06)
> >
> >
> > Review request for kdelibs and Kevin Ottens.
> >
> >
> > Summary
> > -------
> >
> > At the moment Solid::PowerManagement does not watch over interface
> > validity, which is probably the cause for the bug attached. This patch
> > should fix that.
> >
> > P.S.: I did not use the 4.6 goodness (QWeakPointer and
> > QDBusServiceWatcher) as I intend to backport this. Done that I'll use
> > them in trunk.
> >
> >
> > This addresses bug 214921.
> >     https://bugs.kde.org/show_bug.cgi?id=214921
> >
> >
> > Diffs
> > -----
> >
> >   /trunk/KDE/kdelibs/solid/solid/powermanagement.cpp 1050644
> >   /trunk/KDE/kdelibs/solid/solid/powermanagement_p.h 1050644
> >
> > Diff: http://reviewboard.kde.org/r/2196/diff
> >
> >
> > Testing
> > -------
> >
> > Compiles and works
> >
> >
> > Thanks,
> >
> > Dario
> 

-- 
-------------------

Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20091118/e64248ea/attachment.sig>


More information about the kde-core-devel mailing list