on xenial help sign in
Test
commit4d4ae0943f8d0e686a6efeac0fa68800ac46e413 authorMichael Terry <michael.terry@canonical.com> dateWed 23 Apr 2014, 15:16 (12 years ago) parentf6d6e2c
2 files changed+13
plugins/LightDM/Greeter.cpp+12 plugins/LightDM/Greeter.h+1
plugins/LightDM/Greeter.cpp+12
@@ -17,8 +17,11 @@
1717 */
1818
1919#include "Greeter.h"
20+#include <QCoreApplication>
2021#include <QLightDM/Greeter>
2122
23+#include <QDebug>
24+
2225class GreeterPrivate
2326{
2427public:
@@ -57,9 +60,18 @@ Greeter::Greeter(QObject* parent)
5760 connect(d->m_greeter, SIGNAL(authenticationComplete()),
5861 this, SLOT(authenticationCompleteFilter()));
5962
63+ // Listen for "state resets"
64+ connect(QCoreApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)),
65+ this, SLOT(handleAppStateChange(Qt::ApplicationState)));
66+
6067 d->m_greeter->connectSync();
6168}
6269
70+void Greeter::handleAppStateChange(Qt::ApplicationState state)
71+{
72+ qDebug() << "MIKE state change " << state;
73+}
74+
6375bool Greeter::isAuthenticated() const
6476{
6577 Q_D(const Greeter);
plugins/LightDM/Greeter.h+1
@@ -70,6 +70,7 @@ private Q_SLOTS:
7070 void showMessageFilter(const QString &text, QLightDM::Greeter::MessageType type);
7171 void showPromptFilter(const QString &text, QLightDM::Greeter::PromptType type);
7272 void authenticationCompleteFilter();
73+ void handleAppStateChange(Qt::ApplicationState state);
7374};
7475
7576#endif