Commit 7a01d55b authored by Lukáš Tinkl's avatar Lukáš Tinkl
Browse files

stop leaking the login1 suspend job

BUG: 316473
FIXED-IN: 4.10.2
parent b6faef2f
......@@ -35,6 +35,8 @@ Login1SuspendJob::Login1SuspendJob(QDBusInterface *login1Interface,
kDebug() << "Starting Login1 suspend job";
m_method = method;
m_supported = supported;
connect(m_login1Interface, SIGNAL(PrepareForSleep(bool)), this, SLOT(slotLogin1Resuming(bool)));
}
Login1SuspendJob::~Login1SuspendJob()
......@@ -95,5 +97,11 @@ void Login1SuspendJob::sendResult(QDBusPendingCallWatcher *watcher)
watcher->deleteLater();
}
void Login1SuspendJob::slotLogin1Resuming(bool active)
{
if (!active)
emitResult();
}
#include "login1suspendjob.moc"
......@@ -44,6 +44,7 @@ public:
private Q_SLOTS:
void doStart();
void sendResult(QDBusPendingCallWatcher* watcher);
void slotLogin1Resuming(bool active);
private:
QDBusInterface *m_login1Interface;
......
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