Keep watching service until last inhibition goes
Review Request #107698 - Created Dec. 13, 2012 and submitted
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.
Sanity checked inhibition lifetime with python scripts.
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.