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

Add info about akonadi support

parent 8e003816
......@@ -42,6 +42,7 @@ QVector<MailTransport::TransportAbstractPluginInfo> SMTPMailTransportPlugin::nam
info.name = i18nc("@option SMTP transport", "SMTP");
info.description = i18n("An SMTP server on the Internet");
info.identifier = QStringLiteral("SMTP");
info.isAkonadi = false;
return QVector<MailTransport::TransportAbstractPluginInfo>() << info;
}
......
......@@ -32,6 +32,7 @@ struct MAILTRANSPORT_EXPORT TransportAbstractPluginInfo
QString name;
QString identifier;
QString description;
bool isAkonadi = false;
};
class MAILTRANSPORT_EXPORT TransportAbstractPlugin : public QObject
......
......@@ -475,6 +475,7 @@ void TransportManagerPrivate::fillTypes()
type.d->mName = info.name;
type.d->mDescription = info.description;
type.d->mIdentifier = info.identifier;
type.d->mIsAkonadiResource = info.isAkonadi;
types << type;
}
}
......
......@@ -47,7 +47,6 @@ TransportType &TransportType::operator=(const TransportType &other)
bool TransportType::operator==(const TransportType &other) const
{
qDebug() << "d->mIdentifier "<<d->mIdentifier << " other.d->mIdentifier"<<other.d->mIdentifier;
return d->mIdentifier == other.d->mIdentifier;
}
......@@ -70,3 +69,8 @@ QString TransportType::identifier() const
{
return d->mIdentifier;
}
bool TransportType::isAkonadiResource() const
{
return d->mIsAkonadiResource;
}
......@@ -97,6 +97,8 @@ public:
*/
QString identifier() const;
bool isAkonadiResource() const;
private:
//@cond PRIVATE
class Private;
......
......@@ -31,6 +31,7 @@ class TransportType::Private : public QSharedData
{
public:
Private()
: mIsAkonadiResource(false)
{
}
......@@ -40,11 +41,13 @@ public:
mName = other.mName;
mDescription = other.mDescription;
mIdentifier = other.mIdentifier;
mIsAkonadiResource = other.mIsAkonadiResource;
}
QString mName;
QString mDescription;
QString mIdentifier;
bool mIsAkonadiResource;
};
} // namespace MailTransport
......
......@@ -124,7 +124,6 @@ AddTransportDialogNG::AddTransportDialogNG(QWidget *parent)
treeItem->setText(0, type.name());
treeItem->setText(1, type.description());
treeItem->setData(0, Qt::UserRole, type.identifier()); // the transport type
qDebug() << " ADD type " << type.name() << "type.identifier()"<<type.identifier();
//PORT ME
/*
if (type.type() == TransportBase::EnumType::SMTP) {
......
......@@ -55,6 +55,7 @@ QVector<MailTransport::TransportAbstractPluginInfo> AkonadiMailTransportPlugin::
info.name = atype.name();
info.description = atype.description();
info.identifier = atype.identifier();
info.isAkonadi = true;
lst << info;
}
}
......
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