summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-10-18 08:54:44 +0200
committerMontel Laurent <[email protected]>2017-10-18 08:54:44 +0200
commit62faf357147574d44825ade5a139369f73361a46 (patch)
treea2e23cdde7bc58cafb10de0c6963cd4c8af9a815
parentdad05bdd304a9ff6c08a8563f41f8df571e4bed3 (diff)
Use new KPasswordLineEdit
-rw-r--r--resources/dav/resource/urlconfigurationdialog.cpp8
-rw-r--r--resources/dav/resource/urlconfigurationdialog.ui10
2 files changed, 10 insertions, 8 deletions
diff --git a/resources/dav/resource/urlconfigurationdialog.cpp b/resources/dav/resource/urlconfigurationdialog.cpp
index 52f6408..fbdf4f3 100644
--- a/resources/dav/resource/urlconfigurationdialog.cpp
+++ b/resources/dav/resource/urlconfigurationdialog.cpp
@@ -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)
diff --git a/resources/dav/resource/urlconfigurationdialog.ui b/resources/dav/resource/urlconfigurationdialog.ui
index 91f98c1..b7b0c3b 100644
--- a/resources/dav/resource/urlconfigurationdialog.ui
+++ b/resources/dav/resource/urlconfigurationdialog.ui
@@ -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>