Commit 974a6cbc authored by Laurent Montel's avatar Laurent Montel 😁

Use new linepassword

parent 3b55cc21
......@@ -80,6 +80,7 @@ target_link_libraries(imapresource
KF5::I18n
KF5::WindowSystem
akonadi-singlefileresource
KF5::PimCommon
)
########### next target ###############
......
......@@ -301,7 +301,7 @@ void SetupServer::applySettings()
MailTransport::Transport::EnumAuthenticationType::type authtype = getCurrentAuthMode(m_ui->authenticationCombo);
qCDebug(IMAPRESOURCE_LOG) << "saving IMAP auth mode: " << authenticationModeString(authtype);
m_parentResource->settings()->setAuthentication(authtype);
m_parentResource->settings()->setPassword(m_ui->password->text());
m_parentResource->settings()->setPassword(m_ui->password->password());
m_parentResource->settings()->setSubscriptionEnabled(m_ui->subscriptionEnabled->isChecked());
m_parentResource->settings()->setIntervalCheckTime(m_ui->checkInterval->value());
m_parentResource->settings()->setDisconnectedModeEnabled(m_ui->disconnectedModeEnabled->isChecked());
......@@ -349,7 +349,7 @@ void SetupServer::applySettings()
m_parentResource->settings()->setSieveCustomAuthentification(QStringLiteral("CustomUserPassword"));
}
m_parentResource->settings()->setSieveCustomPassword(m_ui->customPassword->text());
m_parentResource->settings()->setSieveCustomPassword(m_ui->customPassword->password());
m_parentResource->settings()->save();
qCDebug(IMAPRESOURCE_LOG) << "wrote" << m_ui->imapServer->text() << m_ui->userName->text() << m_ui->safeImapGroup->checkedId();
......@@ -414,7 +414,7 @@ void SetupServer::readSettings()
"prompted for your password when needed."),
i18n("Do not use KWallet"), QStringLiteral("warning_kwallet_disabled"));
} else {
m_ui->password->insert(password);
m_ui->password->passwordLineEdit()->insert(password);
}
m_ui->subscriptionEnabled->setChecked(m_parentResource->settings()->subscriptionEnabled());
......@@ -470,7 +470,7 @@ void SetupServer::readSettings()
"prompted for your password when needed."),
i18n("Do not use KWallet"), QStringLiteral("warning_kwallet_disabled"));
} else {
m_ui->customPassword->insert(customPassword);
m_ui->customPassword->passwordLineEdit()->insert(customPassword);
}
const QString sieverCustomAuth(m_parentResource->settings()->sieveCustomAuthentification());
......@@ -660,7 +660,7 @@ void SetupServer::slotManageSubscriptions()
QPointer<SubscriptionDialog> subscriptions = new SubscriptionDialog(this);
subscriptions->setWindowTitle(i18n("Serverside Subscription"));
subscriptions->setWindowIcon(QIcon::fromTheme(QStringLiteral("network-server")));
subscriptions->connectAccount(account, m_ui->password->text());
subscriptions->connectAccount(account, m_ui->password->password());
m_subscriptionsChanged = subscriptions->isSubscriptionChanged();
subscriptions->exec();
......
......@@ -107,13 +107,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="KLineEdit" name="password">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<property name="trapReturnKey" stdset="0">
<bool>true</bool>
</property>
<widget class="PimCommon::LineEditPassword" name="password">
</widget>
</item>
</layout>
......@@ -277,13 +271,7 @@
</widget>
</item>
<item row="5" column="1">
<widget class="KLineEdit" name="customPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
<property name="trapReturnKey" stdset="0">
<bool>true</bool>
</property>
<widget class="PimCommon::LineEditPassword" name="customPassword">
</widget>
</item>
<item row="0" column="0">
......@@ -692,6 +680,11 @@ p, li { white-space: pre-wrap; }
<header>CollectionRequester</header>
<container>1</container>
</customwidget>
<customwidget>
<class>PimCommon::LineEditPassword</class>
<extends>QLineEdit</extends>
<header>pimcommon/lineeditpassword.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
......
......@@ -56,6 +56,7 @@ target_link_libraries(akonadi_kolab_resource
KF5::Contacts
KF5::CalendarCore
akonadi-singlefileresource
KF5::PimCommon
)
install(FILES kolabresource.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents")
......
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