Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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

A plugin can return several instance

parent a45e70f7
......@@ -24,6 +24,13 @@
#include "kdepim_export.h"
namespace KPIM {
struct KDEPIM_EXPORT AddressessLineEditAbstractPluginInfo
{
QString name;
QString identifier;
QString description;
};
class KDEPIM_EXPORT AddressessLineEditAbstractPlugin : public QObject
{
Q_OBJECT
......@@ -31,7 +38,8 @@ public:
explicit AddressessLineEditAbstractPlugin(QObject *parent = nullptr);
~AddressessLineEditAbstractPlugin();
virtual QString identifier() const = 0;
virtual QVector<AddressessLineEditAbstractPluginInfo> names() const = 0;
virtual void start() = 0;
virtual void cancel() = 0;
virtual void stop() = 0;
......
......@@ -165,14 +165,12 @@ QVector<KPIM::AddressessLineEditAbstractPlugin *> AddressessLineEditPluginManage
KPIM::AddressessLineEditAbstractPlugin *AddressessLineEditPluginManager::plugin(const QString &identifier)
{
#if 0
for (KPIM::AddressessLineEditAbstractPlugin *p : pluginsList()) {
for (const AddressessLineEditPluginInfo &info : p->names()) {
for (const AddressessLineEditAbstractPluginInfo &info : p->names()) {
if (info.identifier == identifier) {
return p;
}
}
}
#endif
return {};
}
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