on xenial help sign in
Make isAuthenticated a notifiable property
2b50113Michael Terry
plugins/LightDM/Greeter.cpp+2
@@ -106,6 +106,7 @@ void Greeter::authenticate(const QString &username)
106 }
106 }
107
107
108 d->m_greeter->authenticate(username);
108 d->m_greeter->authenticate(username);
109+ Q_EMIT isAuthenticatedChanged();
109 Q_EMIT authenticationUserChanged(username);
110 Q_EMIT authenticationUserChanged(username);
110}
111}
111
112
@@ -150,5 +151,6 @@ void Greeter::authenticationCompleteFilter()
150 Q_EMIT promptlessChanged();
151 Q_EMIT promptlessChanged();
151 }
152 }
152
153
154+ Q_EMIT isAuthenticatedChanged();
153 Q_EMIT authenticationComplete();
155 Q_EMIT authenticationComplete();
154}
156}
plugins/LightDM/Greeter.h+2−1
@@ -35,7 +35,7 @@ class Greeter : public QObject
35 Q_OBJECT
35 Q_OBJECT
36
36
37 Q_PROPERTY(bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged)
37 Q_PROPERTY(bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged)
38− Q_PROPERTY(bool authenticated READ isAuthenticated)
38+ Q_PROPERTY(bool authenticated READ isAuthenticated NOTIFY isAuthenticatedChanged)
39 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
39 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
40 Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged)
40 Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged)
41
41
@@ -59,6 +59,7 @@ Q_SIGNALS:
59 void authenticationComplete();
59 void authenticationComplete();
60 void authenticationUserChanged(const QString &user);
60 void authenticationUserChanged(const QString &user);
61 void isActiveChanged();
61 void isActiveChanged();
62+ void isAuthenticatedChanged();
62 void promptlessChanged();
63 void promptlessChanged();
63 void showGreeter();
64 void showGreeter();
64
65