Commit 3be9dcec authored by Laurent Montel's avatar Laurent Montel 😁

Use KPasswordLineEdit

parent 45e038d3
......@@ -115,7 +115,7 @@ void ConfigDialog::writeConfig()
void ConfigDialog::setPassword(const QString &password)
{
mUi.password->setText(password);
mUi.password->setPassword(password);
}
void ConfigDialog::onSyncRangeStartTypeChanged()
......@@ -138,7 +138,7 @@ void ConfigDialog::onAddButtonClicked()
{
QPointer<UrlConfigurationDialog> dlg = new UrlConfigurationDialog(this);
dlg->setDefaultUsername(mUi.kcfg_defaultUsername->text());
dlg->setDefaultPassword(mUi.password->text());
dlg->setDefaultPassword(mUi.password->password());
const int result = dlg->exec();
if (result == QDialog::Accepted && !dlg.isNull()) {
......@@ -174,7 +174,7 @@ void ConfigDialog::onSearchButtonClicked()
{
QPointer<SearchDialog> dlg = new SearchDialog(this);
dlg->setUsername(mUi.kcfg_defaultUsername->text());
dlg->setPassword(mUi.password->text());
dlg->setPassword(mUi.password->password());
const int result = dlg->exec();
if (result == QDialog::Accepted && !dlg.isNull()) {
......@@ -250,7 +250,7 @@ void ConfigDialog::onEditButtonClicked()
dlg->setPassword(urlConfig->mPassword);
}
dlg->setDefaultUsername(mUi.kcfg_defaultUsername->text());
dlg->setDefaultPassword(mUi.password->text());
dlg->setDefaultPassword(mUi.password->password());
const int result = dlg->exec();
......@@ -281,7 +281,7 @@ void ConfigDialog::onOkClicked()
}
mManager->updateSettings();
Settings::self()->setDefaultPassword(mUi.password->text());
Settings::self()->setDefaultPassword(mUi.password->password());
accept();
}
......
......@@ -144,13 +144,7 @@
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="2,1">
<item>
<widget class="QLineEdit" name="password">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<widget class="KPasswordLineEdit" name="password">
</widget>
</item>
<item>
......@@ -315,6 +309,11 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KPasswordLineEdit</class>
<extends>QWidget</extends>
<header>kpasswordlineedit.h</header>
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
......
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