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