@@ -19,9 +19,6 @@
1919#include "../Greeter.h"
2020#include "../GreeterPrivate.h"
2121
22−#include <QEventLoop>
23−#include <QTimer>
24−
2522namespace QLightDM
2623{
2724
@@ -72,13 +69,6 @@ void GreeterPrivate::handleRespond(const QString &response)
7269{
7370 Q_Q(Greeter);
7471
75− if (qgetenv("UNITY_TESTING").isEmpty()) {
76− // simulate PAM's delay
77− QEventLoop loop;
78− QTimer::singleShot(1000, &loop, SLOT(quit()));
79− loop.exec();
80− }
81−
8272 if (authenticationUser == "no-response")
8373 return;
8474 else if (authenticationUser == "two-factor") {
@@ -88,11 +78,11 @@ void GreeterPrivate::handleRespond(const QString &response)
8878 Q_EMIT q->showPrompt("otp", Greeter::PromptTypeQuestion);
8979 } else {
9080 authenticated = false;
91− Q_EMIT q->authenticationComplete();
81+ q->sendAuthenticationComplete();
9282 }
9383 } else {
9484 authenticated = (response == "otp");
95− Q_EMIT q->authenticationComplete();
85+ q->sendAuthenticationComplete();
9686 }
9787 return;
9888 }
@@ -102,7 +92,7 @@ void GreeterPrivate::handleRespond(const QString &response)
10292 } else {
10393 authenticated = (response == "password");
10494 }
105− Q_EMIT q->authenticationComplete();
95+ q->sendAuthenticationComplete();
10696}
10797
10898}