Commit cea744a9 authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new api

parent 91bbc029
......@@ -41,7 +41,7 @@ set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
set(AKONADI_MIMELIB_VERSION "5.5.40")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.5.40")
set(KLDAP_LIB_VERSION "5.5.40")
set(KMAILTRANSPORT_LIB_VERSION "5.5.40")
set(KMAILTRANSPORT_LIB_VERSION "5.5.65")
set(AKONADI_VERSION "5.5.40")
set(KIMAP_LIB_VERSION "5.5.40")
set(AKONADI_MIMELIB_VERSION "5.5.40")
......
......@@ -32,12 +32,6 @@ struct StringValueTable {
typedef typename T::type value_type;
};
static const StringValueTable<MailTransport::Transport::EnumType> transportTypeEnums[] = {
{ "smtp", MailTransport::Transport::EnumType::SMTP },
{ "akonadi", MailTransport::Transport::EnumType::Akonadi }
};
static const int transportTypeEnumsSize = sizeof(transportTypeEnums) / sizeof(*transportTypeEnums);
static const StringValueTable<MailTransport::Transport::EnumEncryption> encryptionEnum[] = {
{ "none", MailTransport::Transport::EnumEncryption::None },
{ "ssl", MailTransport::Transport::EnumEncryption::SSL },
......@@ -78,8 +72,7 @@ Transport::Transport(const QString &type, QObject *parent)
, m_auth(MailTransport::Transport::EnumAuthenticationType::PLAIN)
, m_editMode(false)
{
m_transportType = stringToValue(transportTypeEnums, transportTypeEnumsSize, type);
if (m_transportType == MailTransport::Transport::EnumType::SMTP) {
if (type == QLatin1String("smtp")) {
m_port = 25;
}
}
......@@ -125,7 +118,7 @@ void Transport::edit()
if (!mt) {
Q_EMIT error(i18n("Could not load config dialog for UID '%1'", m_transportId));
} else {
MailTransport::TransportManager::self()->configureTransport(mt, nullptr);
MailTransport::TransportManager::self()->configureTransport(mt->identifier(), mt, nullptr);
}
}
......
......@@ -50,7 +50,6 @@ private:
private:
int m_transportId;
MailTransport::Transport::EnumType::type m_transportType;
QString m_name;
QString m_host;
int m_port;
......
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