summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-04-02 11:58:57 +0200
committerMontel Laurent <[email protected]>2016-04-02 11:58:57 +0200
commitdb52c92ad30a15799f73c4276f5b08627e95c603 (patch)
tree444db0d5ad528f7180e7f174143563b08f491745
parentebde55d441425fd8db9f80b2def9553e415005a5 (diff)
Create dynamically action list
-rw-r--r--messageviewer/src/webengine/urlinterceptor/networkurlinterceptormanager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/messageviewer/src/webengine/urlinterceptor/networkurlinterceptormanager.cpp b/messageviewer/src/webengine/urlinterceptor/networkurlinterceptormanager.cpp
index 9da7081..ea810b3 100644
--- a/messageviewer/src/webengine/urlinterceptor/networkurlinterceptormanager.cpp
+++ b/messageviewer/src/webengine/urlinterceptor/networkurlinterceptormanager.cpp
@@ -34,13 +34,16 @@ public:
QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent) const;
void createInterfaces(QWebEngineView *webEngine, KActionCollection *ac);
QVector<MessageViewer::NetworkPluginUrlInterceptorInterface *> mListInterface;
- QList<QAction *> mActionList;
NetworkUrlInterceptorManager *q;
};
QList<QAction *> NetworkUrlInterceptorManagerPrivate::actions() const
{
- return mActionList;
+ QList<QAction *> lstActions;
+ Q_FOREACH(MessageViewer::NetworkPluginUrlInterceptorInterface *interface, mListInterface) {
+ lstActions.append(interface->actions());
+ }
+ return lstActions;
}
QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> NetworkUrlInterceptorManagerPrivate::configureInterceptorList(QWidget *parent) const
@@ -59,7 +62,6 @@ void NetworkUrlInterceptorManagerPrivate::createInterfaces(QWebEngineView *webEn
Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
MessageViewer::NetworkPluginUrlInterceptorInterface *interface = plugin->createInterface(webEngine, q);
interface->createActions(ac);
- mActionList.append(interface->actions());
mListInterface.append(interface);
}
}