on xenial help sign in
Make isAuthenticated a notifiable property
commit2b5011360c63d68fde6495038e2c03a50834e236 authorMichael Terry <michael.terry@canonical.com> dateFri 15 Aug 2014, 16:23 (12 years ago) parent5613e47
2 files changed+4−1
plugins/LightDM/Greeter.cpp+2 plugins/LightDM/Greeter.h+2−1
plugins/LightDM/Greeter.cpp+2
@@ -106,6 +106,7 @@ void Greeter::authenticate(const QString &username)
106106 }
107107
108108 d->m_greeter->authenticate(username);
109+ Q_EMIT isAuthenticatedChanged();
109110 Q_EMIT authenticationUserChanged(username);
110111}
111112
@@ -150,5 +151,6 @@ void Greeter::authenticationCompleteFilter()
150151 Q_EMIT promptlessChanged();
151152 }
152153
154+ Q_EMIT isAuthenticatedChanged();
153155 Q_EMIT authenticationComplete();
154156}
plugins/LightDM/Greeter.h+2−1
@@ -35,7 +35,7 @@ class Greeter : public QObject
3535 Q_OBJECT
3636
3737 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)
3939 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
4040 Q_PROPERTY(bool promptless READ promptless NOTIFY promptlessChanged)
4141
@@ -59,6 +59,7 @@ Q_SIGNALS:
5959 void authenticationComplete();
6060 void authenticationUserChanged(const QString &user);
6161 void isActiveChanged();
62+ void isAuthenticatedChanged();
6263 void promptlessChanged();
6364 void showGreeter();
6465