mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kutils: start counting from 1 in KPowerManagerInhibitImpl::Inhibit()
because 0 should be invalid cookie, much like the inhibition cookie of the org.freedesktop.ScreenSaver interface Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9195193191
commit
086e08f00a
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ uint KPowerManagerInhibitImpl::Inhibit(const QString &application, const QString
|
|||
kWarning() << "Inhibit limit greater than INT_MAX";
|
||||
return 0;
|
||||
}
|
||||
uint cookiecounter = 0;
|
||||
uint cookiecounter = 1;
|
||||
while (m_cookies.contains(cookiecounter)) {
|
||||
if (cookiecounter >= maxinhibitors) {
|
||||
kWarning() << "Inhibit limit reached";
|
||||
|
|
Loading…
Add table
Reference in a new issue