Commit 108ceb7c authored by David Edmundson's avatar David Edmundson Committed by Tomaz Canabrava
Browse files

Port away from KIdleTime::simulateUserActivity()

The goal of the existing method simulateUserActivity was to make
konversation react as though the user has interacted with the system
resetting away states and restarting timers.

`KIdleTime::simulateUserActivity()` tells *every* application that the
user has interacted with the system so they can reset the timers.

It's unnecesary for konversation to do this. This method will be
deprecated in newer KIdleTime.
parent 93639a84
Pipeline #256363 passed with stage
in 3 minutes and 46 seconds
......@@ -151,10 +151,9 @@ void AwayManager::setGlobalAway(bool away)
void AwayManager::updateGlobalAwayAction(bool away)
// Regardless of any implementation: If the given parameter indicates
// that the user is not away we should simulate user activity to
// ensure that the away-status of the user is really reset.
// that the user is not away we should ensure that the away-status of the user is really reset.
if (!away)
Application* konvApp = Application::instance();
auto* awayAction = qobject_cast<KToggleAction*>(konvApp->getMainWindow()->actionCollection()->action(QStringLiteral("toggle_away")));
......@@ -270,10 +269,9 @@ void AwayManager::implementMarkIdentityAway(int identityId)
void AwayManager::simulateUserActivity()
void AwayManager::resetUserActivity()
// Tell KIdleTime that it should reset the user's idle status.
void AwayManager::resumeFromIdle()
......@@ -42,13 +42,10 @@ class AwayManager : public QObject
void setManagedIdentitiesUnaway();
* Simulates user activity. This means the implementation should ensure
* the idle indicators should be reset as if the user did some input
* himself.
* This tells KIdleTime that the user was active. Then the idle-time
* calculation is restarted.
void simulateUserActivity();
void resetUserActivity();
void setGlobalAway(bool away);
void updateGlobalAwayAction(bool away);
......@@ -204,7 +204,7 @@ void DBus::changeAwayStatus(bool away)
// to be restarted completely (which means the user will only
// get marked as "auto-away" if the configured idle-timeout has
// expired).
Supports Markdown
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