diff --git a/autotests/ksldtest.cpp b/autotests/ksldtest.cpp --- a/autotests/ksldtest.cpp +++ b/autotests/ksldtest.cpp @@ -150,9 +150,6 @@ QVERIFY(unlockedSpy.isValid()); // let's wait quite some time to give the greeter a chance to come up -#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) - QEXPECT_FAIL("", "Qt::QueuedConnection broken in Qt 5.6", Abort); -#endif QVERIFY(lockedSpy.wait(30000)); QCOMPARE(ksld.lockState(), ScreenLocker::KSldApp::Locked); diff --git a/ksldapp.cpp b/ksldapp.cpp --- a/ksldapp.cpp +++ b/ksldapp.cpp @@ -607,15 +607,19 @@ return; } m_lockWindow->setGlobalAccel(m_globalAccel); - connect(m_lockWindow, &AbstractLocker::userActivity, this, + connect(m_lockWindow, &AbstractLocker::userActivity, m_lockWindow, [this]() { if (isGraceTime()) { unlock(); } }, Qt::QueuedConnection ); - connect(m_lockWindow, &AbstractLocker::lockWindowShown, this, &KSldApp::lockScreenShown, Qt::QueuedConnection); + connect(m_lockWindow, &AbstractLocker::lockWindowShown, m_lockWindow, + [this] { + lockScreenShown(); + } + , Qt::QueuedConnection); connect(m_waylandServer, &WaylandServer::x11WindowAdded, m_lockWindow, &AbstractLocker::addAllowedWindow); } m_lockWindow->showLockWindow();