From fe0946c6161fe2e6e17e94bddb03cfd93a727f6c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 19 Jan 2020 18:13:42 +0200 Subject: [PATCH] [nightcolor] Check whether Night Color is inhibited by a D-Bus service more efficiently --- colorcorrection/colorcorrectdbusinterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/colorcorrection/colorcorrectdbusinterface.cpp b/colorcorrection/colorcorrectdbusinterface.cpp index dc46481bf1..18f9368a29 100644 --- a/colorcorrection/colorcorrectdbusinterface.cpp +++ b/colorcorrection/colorcorrectdbusinterface.cpp @@ -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); }