Commit fe0946c6 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[nightcolor] Check whether Night Color is inhibited by a D-Bus service more efficiently

parent 093133c4
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment