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

Improve api to support future script support

CCBUG: 361083
parent ea0cab95
......@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
set(MESSAGELIB_LIB_VERSION "5.2.44")
set(MESSAGELIB_LIB_VERSION "5.2.45")
set(KF5_VERSION "5.19.0")
set(KDEPIMLIBS_LIB_VERSION "5.2.40")
......
......@@ -51,10 +51,10 @@ void ViewerPluginInterface::setText(const QString &text)
// Reimplement in subclass.
}
QAction *ViewerPluginInterface::action() const
QList<QAction *> ViewerPluginInterface::actions() const
{
// Reimplement in subclass
return Q_NULLPTR;
return {};
}
void ViewerPluginInterface::setUrl(const QUrl &url)
......
......@@ -46,7 +46,7 @@ public:
virtual void execute();
virtual void setText(const QString &text);
virtual QAction *action() const;
virtual QList<QAction *> actions() const;
virtual void setUrl(const QUrl &url);
virtual void setMessage(const KMime::Message::Ptr &value);
virtual void setMessageItem(const Akonadi::Item &item);
......
......@@ -96,10 +96,10 @@ QList<QAction *> ViewerPluginToolManagerPrivate::actionList(ViewerPluginInterfac
QList<QAction *> lstAction;
Q_FOREACH (MessageViewer::ViewerPluginInterface *interface, mListInterface) {
if (features & ViewerPluginInterface::All) {
lstAction.append(interface->action());
lstAction.append(interface->actions());
} else {
if (interface->featureTypes() & features) {
lstAction.append(interface->action());
lstAction.append(interface->actions());
}
}
}
......
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