Commit f70de12f authored by Ronan's avatar Ronan

feat(ScreenSaver): add logs

parent a5147463
......@@ -54,7 +54,9 @@ void ScreenSaverDBus::setScreenSaverStatus (bool status) {
qWarning() << QStringLiteral("Uninhibit screen saver failed: `%1: %2`.")
.arg(reply.errorName()).arg(reply.errorMessage());
return;
}
} else
qInfo("Uninhibit screen saver.");
mToken = uint32_t(reply.arguments().first().toULongLong());
mScreenSaverStatus = false;
emit screenSaverStatusChanged(mScreenSaverStatus);
......@@ -67,7 +69,9 @@ void ScreenSaverDBus::setScreenSaverStatus (bool status) {
qWarning() << QStringLiteral("Inhibit screen saver failed: `%1: %2`.")
.arg(reply.errorName()).arg(reply.errorMessage());
return;
}
} else
qInfo("Inhibit screen saver.");
mScreenSaverStatus = true;
emit screenSaverStatusChanged(mScreenSaverStatus);
}
......@@ -36,6 +36,7 @@ namespace {
ScreenSaverXdg::ScreenSaverXdg (QObject *parent) : QObject(parent) {
mTimer.setInterval(Interval);
QObject::connect(&mTimer, &QTimer::timeout, []() {
// Legacy for systems without DBus screensaver.
QProcess::startDetached(Program, Arguments);
});
}
......
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