Commit cd344631 authored by Karel Slaný's avatar Karel Slaný
Browse files

Locking on timeout only when PIN is set.

parent b5305d49
......@@ -24,6 +24,7 @@
#include <QEvent>
#include "src/locker.h"
#include "src/settings.h"
/*
* Application behaviour on supported platforms:
......@@ -45,6 +46,7 @@ Locker::Locker(QObject *parent)
m_ignoreImmediateSuspension(false)
{
m_inactivityTimer.setInterval(10000); /* 10 s */
m_inactivityTimer.start();
connect(&m_inactivityTimer, SIGNAL(timeout()),
this, SLOT(inactivityTimeOut()));
......@@ -81,8 +83,10 @@ void Locker::processNewState(Qt::ApplicationState state)
void Locker::inactivityTimeOut(void)
{
/* Inactivity timer timed out. */
emit lockApp();
/* Inactivity timer timed out and PIN value is set and recovered. */
if (!globSet._pinVal.isEmpty()) {
emit lockApp();
}
}
bool Locker::eventFilter(QObject *watched, QEvent *event)
......
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