From 5be4cae996d0411f4ab50af66d95452bf3a6022e Mon Sep 17 00:00:00 2001 From: Keshav Bhatt Date: Wed, 30 Mar 2022 14:22:21 +0530 Subject: chore: unify passowrd echomode in lock widget --- src/lock.cpp | 17 ++++++++++------- src/mainwindow.cpp | 7 ++----- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/lock.cpp b/src/lock.cpp index c2b8a13..6cd0d6c 100644 --- a/src/lock.cpp +++ b/src/lock.cpp @@ -37,15 +37,18 @@ Lock::Lock(QWidget *parent) : QWidget(parent), ui(new Ui::Lock) { ui->caps2->setStyleSheet(capsStyle); ui->signup_warning->setStyleSheet(capsStyle); ui->wrong->setStyleSheet(capsStyle); + foreach (QLineEdit *le, this->findChildren()) { + le->setStyleSheet( + "QLineEdit[echoMode=\"2\"]{lineedit-password-character: 9899}"); + } } - -void Lock::signUp(){ - isLocked = false; - ui->signup->show(); - ui->login->hide(); - animate(); - ui->passcode1->setFocus(); +void Lock::signUp() { + isLocked = false; + ui->signup->show(); + ui->login->hide(); + animate(); + ui->passcode1->setFocus(); } void Lock::animate() { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 1893448..74f196c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -129,10 +129,8 @@ void MainWindow::loadAppWithArgument(const QString &arg) { // chat composer if (arg.contains("send?") || arg.contains("send/?")) { QString newArg = arg; - qWarning() << "New chat composer"; newArg = newArg.replace("?", "&"); QUrlQuery query(newArg); - qWarning() << query.hasQueryItem("phone"); QString phone, phoneStr, text, textStr, urlStr; // create send url equivalent phone = query.queryItemValue("phone"); @@ -140,7 +138,6 @@ void MainWindow::loadAppWithArgument(const QString &arg) { phoneStr = phone.isEmpty() ? "" : "phone=" + phone; textStr = text.isEmpty() ? "" : "text=" + text; urlStr = "https://web.whatsapp.com/send?" + phoneStr + "&" + textStr; - qWarning() << "Loading" << urlStr; this->webEngine->page()->load(QUrl(urlStr)); return; } @@ -872,7 +869,7 @@ void MainWindow::checkLoadedCorrectly() { "document.querySelector('body').className", [this](const QVariant &result) { if (result.toString().contains("page-version", Qt::CaseInsensitive)) { - qWarning() << "Test 1 found" << result.toString(); + qDebug() << "Test 1 found" << result.toString(); webEngine->page()->runJavaScript( "document.getElementsByTagName('body')[0].innerText = ''"); loadingQuirk("test1"); @@ -890,7 +887,7 @@ void MainWindow::checkLoadedCorrectly() { quitAction->trigger(); } else { - qWarning() << "Test 1 loaded correctly value:" << result.toString(); + qDebug() << "Test 1 loaded correctly, value:" << result.toString(); } }); } -- cgit v1.2.3