----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/107698/#review26380 -----------------------------------------------------------
powerdevil/daemon/powerdevilpolicyagent.cpp <http://git.reviewboard.kde.org/r/107698/#comment20096> I wouldn't use key() for that, as there is no guarantee AFAIK that if not found, it would return 0 (it usually returns a default constructed key, which in case of an int could be pretty much any value.). As such, I either propose .key(service, 0), which guarantees the returned key would be 0 if not existent; or .values().contains(service). I'd choose the second for clarity. - Dario Freddi On Dec. 13, 2012, 12:55 p.m., Oliver Henshaw wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/107698/ > ----------------------------------------------------------- > > (Updated Dec. 13, 2012, 12:55 p.m.) > > > Review request for Solid. > > > Description > ------- > > Keep watching service until last inhibition goes > > > Also contains the commit: > > Remove inhibition with take() for efficiency > > Re-use the returned service QString rather than look it up each time. > > > Diffs > ----- > > powerdevil/daemon/powerdevilpolicyagent.cpp > d688512f0eba1c9d201c32bf5312edbe87af3c78 > > Diff: http://git.reviewboard.kde.org/r/107698/diff/ > > > Testing > ------- > > Sanity checked inhibition lifetime with python scripts. > > > Thanks, > > Oliver Henshaw > >
_______________________________________________ Kde-hardware-devel mailing list Kde-hardware-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-hardware-devel