diff --git a/components/gamingshellplugin/gamemodecontrol.cpp b/components/gamingshellplugin/gamemodecontrol.cpp index 20778cf2..361dbb00 100644 --- a/components/gamingshellplugin/gamemodecontrol.cpp +++ b/components/gamingshellplugin/gamemodecontrol.cpp @@ -18,9 +18,6 @@ GameModeControl::GameModeControl(QObject *parent) , m_iface(new QDBusInterface(s_service, s_path, s_iface, QDBusConnection::sessionBus(), this)) { m_available = m_iface->isValid(); - if (!m_available) { - qDebug() << "GameModeControl: Feral GameMode not available"; - } } bool GameModeControl::available() const diff --git a/components/gamingshellplugin/powerprofilecontrol.cpp b/components/gamingshellplugin/powerprofilecontrol.cpp index dc42cdb0..004115bc 100644 --- a/components/gamingshellplugin/powerprofilecontrol.cpp +++ b/components/gamingshellplugin/powerprofilecontrol.cpp @@ -25,8 +25,6 @@ PowerProfileControl::PowerProfileControl(QObject *parent) // Subscribe to property changes QDBusConnection::systemBus() .connect(s_service, s_path, s_propIface, QStringLiteral("PropertiesChanged"), this, SLOT(onPropertiesChanged(QString, QVariantMap, QStringList))); - } else { - qDebug() << "PowerProfileControl: power-profiles-daemon not available"; } } diff --git a/components/raiselockscreenplugin/raiselockscreen.cpp b/components/raiselockscreenplugin/raiselockscreen.cpp index f5b01502..9db924a3 100644 --- a/components/raiselockscreenplugin/raiselockscreen.cpp +++ b/components/raiselockscreenplugin/raiselockscreen.cpp @@ -90,7 +90,6 @@ void RaiseLockscreen::setOverlay() // Add event filter to listen for when wayland window appears, and try again m_window->installEventFilter(this); setInitialized(false); - qCWarning(LOGGING_CATEGORY) << "Unable to set overlay: unable to get wayland window"; return; } @@ -99,13 +98,11 @@ void RaiseLockscreen::setOverlay() connect(waylandWindow, &QNativeInterface::Private::QWaylandWindow::surfaceRoleCreated, this, [this, waylandWindow]() { m_implementation->allow(waylandWindow->surface()); setInitialized(true); - qCDebug(LOGGING_CATEGORY) << "Initialized overlay successfully"; }); if (waylandWindow->surface()) { m_implementation->allow(waylandWindow->surface()); setInitialized(true); - qCDebug(LOGGING_CATEGORY) << "Initialized overlay successfully"; } } diff --git a/components/screenbrightnessplugin/screenbrightnessutil.cpp b/components/screenbrightnessplugin/screenbrightnessutil.cpp index 2f79a7b7..680174ed 100644 --- a/components/screenbrightnessplugin/screenbrightnessutil.cpp +++ b/components/screenbrightnessplugin/screenbrightnessutil.cpp @@ -6,11 +6,16 @@ #include #include +namespace +{ +const QString SOLID_POWER_MANAGEMENT_SERVICE = QStringLiteral("org.kde.Solid.PowerManagement"); +} + ScreenBrightnessUtil::ScreenBrightnessUtil(QObject *parent) : QObject{parent} { m_brightnessInterface = - new org::kde::Solid::PowerManagement::Actions::BrightnessControl(QStringLiteral("org.kde.Solid.PowerManagement"), + new org::kde::Solid::PowerManagement::Actions::BrightnessControl(SOLID_POWER_MANAGEMENT_SERVICE, QStringLiteral("/org/kde/Solid/PowerManagement/Actions/BrightnessControl"), QDBusConnection::sessionBus(), this); @@ -24,14 +29,14 @@ ScreenBrightnessUtil::ScreenBrightnessUtil(QObject *parent) this, &ScreenBrightnessUtil::fetchMaxBrightness); - fetchBrightness(); - fetchMaxBrightness(); + if (brightnessAvailable()) { + fetchBrightness(); + fetchMaxBrightness(); + } // watch for brightness interface - m_brightnessInterfaceWatcher = new QDBusServiceWatcher(QStringLiteral("org.kde.Solid.PowerManagement.Actions.BrightnessControl"), - QDBusConnection::sessionBus(), - QDBusServiceWatcher::WatchForOwnerChange, - this); + m_brightnessInterfaceWatcher = + new QDBusServiceWatcher(SOLID_POWER_MANAGEMENT_SERVICE, QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this); connect(m_brightnessInterfaceWatcher, &QDBusServiceWatcher::serviceRegistered, this, [this]() -> void { fetchBrightness(); @@ -51,6 +56,10 @@ int ScreenBrightnessUtil::brightness() const void ScreenBrightnessUtil::setBrightness(int brightness) { + if (!brightnessAvailable()) { + return; + } + m_brightnessInterface->setBrightness(brightness); } @@ -66,6 +75,10 @@ bool ScreenBrightnessUtil::brightnessAvailable() const void ScreenBrightnessUtil::fetchBrightness() { + if (!brightnessAvailable()) { + return; + } + QDBusPendingReply reply = m_brightnessInterface->brightness(); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); @@ -83,6 +96,10 @@ void ScreenBrightnessUtil::fetchBrightness() void ScreenBrightnessUtil::fetchMaxBrightness() { + if (!brightnessAvailable()) { + return; + } + QDBusPendingReply reply = m_brightnessInterface->brightnessMax(); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); diff --git a/quicksettings/flashlight/flashlightutil.cpp b/quicksettings/flashlight/flashlightutil.cpp index c7730d25..4e6a2f16 100644 --- a/quicksettings/flashlight/flashlightutil.cpp +++ b/quicksettings/flashlight/flashlightutil.cpp @@ -131,7 +131,6 @@ void FlashlightUtil::findTorchDevice() } if (device == nullptr) { - qWarning() << "No flashlight device found"; return; }