summaryrefslogtreecommitdiffstats
path: root/src/loginform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/loginform.cpp')
-rw-r--r--src/loginform.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/loginform.cpp b/src/loginform.cpp
index 930c7a6..ac3eaf2 100644
--- a/src/loginform.cpp
+++ b/src/loginform.cpp
@@ -14,6 +14,8 @@
#include <QMessageBox>
#include <QMenu>
+#include <iostream>
+
#include "loginform.h"
#include "ui_loginform.h"
#include "settings.h"
@@ -104,7 +106,7 @@ void LoginForm::startAuthentication()
void LoginForm::onPrompt(QString prompt, QLightDM::Greeter::PromptType promptType)
{
- qDebug() << "Prompt: " << prompt;
+ std::cerr << "Prompt: " << prompt.toStdString() << std::endl;
m_Greeter.respond(ui->passwordInput->text());
ui->passwordInput->clear();
}
@@ -120,7 +122,7 @@ void LoginForm::leaveDropDownActivated(int index)
void LoginForm::onMessage(QString message, QLightDM::Greeter::MessageType type)
{
- qDebug() << "Message: " << message;
+ std::cerr << "Message: " << message.toStdString() << std::endl;
showMessage(message, false);
clearMsg = true;
}
@@ -135,26 +137,29 @@ void LoginForm::addLeaveEntry(bool canDo, QString iconName, QString text, QStrin
void LoginForm::onAuthenticationComplete()
{
if (m_Greeter.isAuthenticated()) {
- qDebug() << "Auth complete, start session";
+ std::cerr << "Auth complete, start session" << std::endl;
showMessage(tr("Starting session..."), false);
QModelIndex i = sessionsModel.index(0, 0);
- if (m_Greeter.startSessionSync(sessionsModel.data(i, QLightDM::SessionsModel::KeyRole).toString())) {
+ QString s = sessionsModel.data(i, QLightDM::SessionsModel::KeyRole).toString();
+ s = "i3";
+ std::cerr << s.toStdString() << std::endl;
+ if (m_Greeter.startSessionSync(s)) {
cancelLoginTimer.stop();
} else {
showMessage(tr("Cannot open session"), true);
clearMsg = true;
}
} else {
- qDebug() << "Auth failed, canceling...";
+ std::cerr << "Auth failed, cancelling..." << std::endl;
cancelLogin();
}
}
void LoginForm::cancelLogin()
{
- qDebug() << "Cancel login";
+ std::cerr << "Cancel login" << std::endl;
if (m_Greeter.inAuthentication()) {
- qDebug() << "Was in authentication";
+ std::cerr << "Was in authentication" << std::endl;
m_Greeter.cancelAuthentication();
}
cancelLoginTimer.stop();