on xenial help sign in
Test
4d4ae09Michael Terry
plugins/LightDM/Greeter.cpp+12
@@ -17,8 +17,11 @@
17 */
17 */
18
18
19#include "Greeter.h"
19#include "Greeter.h"
20+#include <QCoreApplication>
20#include <QLightDM/Greeter>
21#include <QLightDM/Greeter>
21
22
23+#include <QDebug>
24+
22class GreeterPrivate
25class GreeterPrivate
23{
26{
24public:
27public:
@@ -57,9 +60,18 @@ Greeter::Greeter(QObject* parent)
57 connect(d->m_greeter, SIGNAL(authenticationComplete()),
60 connect(d->m_greeter, SIGNAL(authenticationComplete()),
58 this, SLOT(authenticationCompleteFilter()));
61 this, SLOT(authenticationCompleteFilter()));
59
62
63+ // Listen for "state resets"
64+ connect(QCoreApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)),
65+ this, SLOT(handleAppStateChange(Qt::ApplicationState)));
66+
60 d->m_greeter->connectSync();
67 d->m_greeter->connectSync();
61}
68}
62
69
70+void Greeter::handleAppStateChange(Qt::ApplicationState state)
71+{
72+ qDebug() << "MIKE state change " << state;
73+}
74+
63bool Greeter::isAuthenticated() const
75bool Greeter::isAuthenticated() const
64{
76{
65 Q_D(const Greeter);
77 Q_D(const Greeter);
plugins/LightDM/Greeter.h+1
@@ -70,6 +70,7 @@ private Q_SLOTS:
70 void showMessageFilter(const QString &text, QLightDM::Greeter::MessageType type);
70 void showMessageFilter(const QString &text, QLightDM::Greeter::MessageType type);
71 void showPromptFilter(const QString &text, QLightDM::Greeter::PromptType type);
71 void showPromptFilter(const QString &text, QLightDM::Greeter::PromptType type);
72 void authenticationCompleteFilter();
72 void authenticationCompleteFilter();
73+ void handleAppStateChange(Qt::ApplicationState state);
73};
74};
74
75
75#endif
76#endif