Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 62faf357 authored by Laurent Montel's avatar Laurent Montel 😁

Use new KPasswordLineEdit

parent dad05bdd
......@@ -63,7 +63,7 @@ UrlConfigurationDialog::UrlConfigurationDialog(QWidget *parent)
connect(mUi.remoteUrl, &KLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.useDefaultCreds, &QRadioButton::toggled, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.username, &KLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.password, &KLineEdit::textChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.password, &KPasswordLineEdit::passwordChanged, this, &UrlConfigurationDialog::onConfigChanged);
connect(mUi.fetchButton, &QPushButton::clicked, this, &UrlConfigurationDialog::onFetchButtonClicked);
connect(mOkButton, &QPushButton::clicked, this, &UrlConfigurationDialog::onOkButtonClicked);
......@@ -151,7 +151,7 @@ QString UrlConfigurationDialog::password() const
if (mUi.useDefaultCreds->isChecked()) {
return mDefaultPassword;
} else {
return mUi.password->text();
return mUi.password->password();
}
}
......@@ -162,7 +162,7 @@ void UrlConfigurationDialog::setDefaultPassword(const QString &password)
void UrlConfigurationDialog::setPassword(const QString &password)
{
mUi.password->setText(password);
mUi.password->setPassword(password);
}
void UrlConfigurationDialog::onConfigChanged()
......@@ -276,7 +276,7 @@ void UrlConfigurationDialog::initModel()
bool UrlConfigurationDialog::checkUserAuthInput()
{
return (mUi.useDefaultCreds->isChecked() || !(mUi.username->text().isEmpty() || mUi.password->text().isEmpty()));
return (mUi.useDefaultCreds->isChecked() || !(mUi.username->text().isEmpty() || mUi.password->password().isEmpty()));
}
void UrlConfigurationDialog::addModelRow(const QString &displayName, const QString &url)
......
......@@ -136,10 +136,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KLineEdit" name="password">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<widget class="KPasswordLineEdit" name="password">
</widget>
</item>
</layout>
......@@ -215,6 +212,11 @@
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>KPasswordLineEdit</class>
<extends>QWidget</extends>
<header>kpasswordlineedit.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
......
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