Commit f1ec5f44 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Honor KDE Kiosk setting lineedit_reveal_password

parent 59434844
Pipeline #67344 passed with stage
in 7 minutes and 17 seconds
......@@ -25,6 +25,7 @@
#include <QButtonGroup>
#include "mailtransport_debug.h"
#include <KAuthorized>
#include <KMessageBox>
#include <KProtocolInfo>
......@@ -136,6 +137,7 @@ void SMTPConfigWidget::init()
d->serverTestFailed = false;
d->ui.setupUi(this);
d->ui.password->setRevealPasswordAvailable(KAuthorized::authorize(QStringLiteral("lineedit_reveal_password")));
d->manager->addWidget(this); // otherwise it doesn't find out about these widgets
d->manager->updateWidgets();
......
......@@ -13,9 +13,10 @@
#include "precommandjob.h"
#include "sessionuiproxy.h"
#include "transport.h"
#include <KAuthorized>
#include <QHash>
#include <QPointer>
#include <kwidgetsaddons_version.h>
#include "mailtransport_debug.h"
#include <KLocalizedString>
......@@ -232,6 +233,9 @@ void SmtpJob::startLoginJob()
dlg->addCommentLine(QString(), transport()->name());
dlg->setUsername(user);
dlg->setPassword(passwd);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 84, 0)
dlg->setRevealPasswordAvailable(KAuthorized::authorize(QStringLiteral("lineedit_reveal_password")));
#endif
connect(this, &KJob::result, dlg, &QDialog::reject);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment