Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb38327' into 'master'
[devicelock] Emit the locked signal if the connection to device lock is lost. Fixes JB#38327

See merge request !20
  • Loading branch information
adenexter committed Apr 25, 2017
2 parents 8837598 + 5fd5169 commit 7348ae1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/nemo-devicelock/devicelock.cpp
Expand Up @@ -73,6 +73,8 @@ DeviceLock::DeviceLock(QObject *parent)
connected();
});
m_connection->onDisconnected(this, [this] {
const bool wasUnlocked = m_state == Unlocked;

m_state = Undefined;

if (m_unlocking) {
Expand All @@ -81,6 +83,10 @@ DeviceLock::DeviceLock(QObject *parent)
}

emit stateChanged();

if (wasUnlocked) {
emit locked();
}
});
if (m_connection->isConnected()) {
connected();
Expand Down

0 comments on commit 7348ae1

Please sign in to comment.