[nightcolor] Check whether Night Color is inhibited by a D-Bus service more efficiently
This commit is contained in:
parent
093133c411
commit
fe0946c616
1 changed files with 2 additions and 2 deletions
|
@ -279,7 +279,7 @@ uint ColorCorrectDBusInterface::inhibit()
|
|||
{
|
||||
const QString serviceName = QDBusContext::message().service();
|
||||
|
||||
if (m_inhibitors.values(serviceName).isEmpty()) {
|
||||
if (!m_inhibitors.contains(serviceName)) {
|
||||
m_inhibitorWatcher->addWatchedService(serviceName);
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ void ColorCorrectDBusInterface::uninhibit(const QString &serviceName, uint cooki
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_inhibitors.values(serviceName).isEmpty()) {
|
||||
if (!m_inhibitors.contains(serviceName)) {
|
||||
m_inhibitorWatcher->removeWatchedService(serviceName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue