Commit 75a72bed authored by Laurent Montel's avatar Laurent Montel 😁

Return action list

parent c5feee19
......@@ -29,16 +29,25 @@ public:
{
createInterfaces(webEngine, ac);
}
QList<QAction *> actions() const;
void createInterfaces(QWebEngineView *webEngine, KActionCollection *ac);
QVector<MessageViewer::NetworkPluginUrlInterceptorInterface *> mListInterface;
QList<QAction *> mActionList;
NetworkUrlInterceptorManager *q;
};
QList<QAction *> NetworkUrlInterceptorManagerPrivate::actions() const
{
return mActionList;
}
void NetworkUrlInterceptorManagerPrivate::createInterfaces(QWebEngineView *webEngine, KActionCollection *ac)
{
Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
MessageViewer::NetworkPluginUrlInterceptorInterface *interface = plugin->createInterface(webEngine, q);
interface->createActions(ac);
mActionList.append(interface->actions());
mListInterface.append(interface);
}
}
......@@ -60,3 +69,8 @@ QVector<MessageViewer::NetworkPluginUrlInterceptorInterface *> NetworkUrlInterce
return d->mListInterface;
}
QList<QAction *> NetworkUrlInterceptorManager::actions() const
{
return d->actions();
}
......@@ -33,6 +33,7 @@ public:
~NetworkUrlInterceptorManager();
QVector<NetworkPluginUrlInterceptorInterface *> interfaceList() const;
QList<QAction *> actions() const;
private:
NetworkUrlInterceptorManagerPrivate *const d;
};
......
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