From 85879cc241b5f658fc613281a49c9a76fbb741bd Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 11 Nov 2017 23:43:52 +0100 Subject: WORK IN PROGRESS! Add bwlp logo, banner support, log message window --- src/loginform.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/loginform.cpp') 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 #include +#include + #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(); -- cgit v1.2.3-55-g7522