diff --git a/daemon/actions/dpms/powerdevildpmsaction.cpp b/daemon/actions/dpms/powerdevildpmsaction.cpp --- a/daemon/actions/dpms/powerdevildpmsaction.cpp +++ b/daemon/actions/dpms/powerdevildpmsaction.cpp @@ -96,15 +96,15 @@ void PowerDevilDPMSAction::onProfileUnload() { - if (m_helper.isNull()) { + if (!isSupported()) { return; } m_helper->profileUnloaded(); } void PowerDevilDPMSAction::onWakeupFromIdle() { - if (!m_helper.isNull()) { + if (isSupported()) { m_helper->stopFade(); } if (m_oldKeyboardBrightness > 0) { @@ -121,16 +121,16 @@ } if (msec == m_idleTime * 1000 - 5000) { // fade out screen - if (!m_helper.isNull()) { + if (isSupported()) { m_helper->startFade(); } } else if (msec == m_idleTime * 1000) { const int brightness = backend()->brightness(PowerDevil::BackendInterface::Keyboard); if (brightness > 0) { m_oldKeyboardBrightness = brightness; setKeyboardBrightnessHelper(0); } - if (!m_helper.isNull()) { + if (isSupported()) { m_helper->dpmsTimeout(); } } @@ -145,7 +145,7 @@ void PowerDevilDPMSAction::onProfileLoad() { - if (m_helper.isNull()) { + if (!isSupported()) { return; } m_helper->profileLoaded(m_idleTime); @@ -159,7 +159,7 @@ return; } - if (m_helper.isNull()) { + if (!isSupported()) { return; } m_helper->trigger(args.value(QStringLiteral("Type")).toString()); @@ -193,7 +193,7 @@ if (m_inhibitScreen) { // Inhibition triggered: disable DPMS - if (!m_helper.isNull()) { + if (isSupported()) { m_helper->inhibited(); } } else {