on xenial help sign in
Let tester set password or pin value in demo mode
commit3598eb6271b0fd7f2cf9076b92a6e08e59064147 authorMichael Terry <michael.terry@canonical.com> dateWed 4 Sep 2013, 13:26 (13 years ago) parent58e3cb6
1 file changed+4−2
tests/mocks/LightDM/demo/GreeterPrivate.cpp+4−2
tests/mocks/LightDM/demo/GreeterPrivate.cpp+4−2
@@ -55,11 +55,13 @@ void GreeterPrivate::handleRespond(const QString &response)
5555 QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
5656 QVariant password = settings.value("password", "none");
5757
58+ QString passwordValue;
5859 if (password == "pin") {
59− authenticated = (response == "1234");
60+ passwordValue = settings.value("passwordValue", "1234").toString();
6061 } else {
61− authenticated = (response == "password");
62+ passwordValue = settings.value("passwordValue", "password").toString();
6263 }
64+ authenticated = (response == passwordValue);
6365 Q_EMIT q->authenticationComplete();
6466}
6567