Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[devicelock] Emit the locked signal if the connection to device lock …
…is lost. Fixes JB#38327
  • Loading branch information
adenexter committed May 24, 2017
1 parent 73bd793 commit 4a5b589
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 4a5b589

Please sign in to comment.