summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-23 21:38:33 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-23 21:38:33 (GMT)
commita11cab3e7aacdf34b03dc59d92b7d273c91425ff (patch)
treed921cab70b0d39584ce1fe22f968005666b03244
parent1b05d8012a4e1399f401a8716d6f282df8f9e1e5 (diff)
Clean up plugins api
-rw-r--r--CMakeLists.txt2
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.cpp7
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h21
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.cpp14
-rw-r--r--messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h3
-rw-r--r--webengineviewer/src/networkmanager/interceptormanager.cpp5
-rw-r--r--webengineviewer/src/networkmanager/interceptormanager.h1
-rw-r--r--webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.cpp6
-rw-r--r--webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.h21
-rw-r--r--webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp18
-rw-r--r--webengineviewer/src/urlinterceptor/networkurlinterceptormanager.h1
11 files changed, 2 insertions, 97 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc2d29f..566f916 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
-set(PIM_VERSION "5.3.63")
+set(PIM_VERSION "5.3.64")
set(MESSAGELIB_LIB_VERSION ${PIM_VERSION})
set(AKONADIMIME_LIB_VERSION "5.3.40")
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.cpp b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.cpp
index 683d80c..735dcf4 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.cpp
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.cpp
@@ -54,13 +54,6 @@ void PluginEditorCheckBeforeSend::showConfigureDialog(QWidget *parent)
Q_UNUSED(parent);
}
-PluginEditorCheckBeforeSendConfigureWidgetSetting PluginEditorCheckBeforeSend::createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const
-{
- Q_UNUSED(identityManager)
- Q_UNUSED(parent);
- return {};
-}
-
void PluginEditorCheckBeforeSend::emitConfigChanged()
{
Q_EMIT configChanged();
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h
index f61c383..cc9754a 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesend.h
@@ -31,25 +31,6 @@ namespace MessageComposer
{
class PluginEditorCheckBeforeSendPrivate;
class PluginEditorCheckBeforeSendInterface;
-class PluginEditorCheckBeforeSendConfigureWidget;
-
-struct MESSAGECOMPOSER_EXPORT PluginEditorCheckBeforeSendConfigureWidgetSetting {
- PluginEditorCheckBeforeSendConfigureWidgetSetting()
- : configureWidget(Q_NULLPTR)
- {
-
- }
-
- PluginEditorCheckBeforeSendConfigureWidgetSetting(MessageComposer::PluginEditorCheckBeforeSendConfigureWidget *w, const QString &widgetName)
- : name(widgetName),
- configureWidget(w)
- {
-
- }
-
- QString name;
- MessageComposer::PluginEditorCheckBeforeSendConfigureWidget *configureWidget;
-};
class MESSAGECOMPOSER_EXPORT PluginEditorCheckBeforeSend : public QObject
{
@@ -64,8 +45,6 @@ public:
virtual void showConfigureDialog(QWidget *parent = Q_NULLPTR);
- virtual PluginEditorCheckBeforeSendConfigureWidgetSetting createConfigureWidget(KIdentityManagement::IdentityManager *identityManager, QWidget *parent) const;
-
void emitConfigChanged();
virtual QString description() const;
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.cpp b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.cpp
index bb72abd..a4b1237 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.cpp
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.cpp
@@ -25,14 +25,12 @@ class MessageComposer::PluginEditorCheckBeforeSendInterfacePrivate
{
public:
PluginEditorCheckBeforeSendInterfacePrivate()
- : mParentWidget(Q_NULLPTR),
- mIdentityManagement(Q_NULLPTR)
+ : mParentWidget(Q_NULLPTR)
{
}
MessageComposer::PluginEditorCheckBeforeSendParams parameters;
QWidget *mParentWidget;
- KIdentityManagement::IdentityManager *mIdentityManagement;
};
PluginEditorCheckBeforeSendInterface::PluginEditorCheckBeforeSendInterface(QObject *parent)
@@ -57,16 +55,6 @@ QWidget *PluginEditorCheckBeforeSendInterface::parentWidget() const
return d->mParentWidget;
}
-void PluginEditorCheckBeforeSendInterface::setIdentityManagement(KIdentityManagement::IdentityManager *identityManagement)
-{
- d->mIdentityManagement = identityManagement;
-}
-
-KIdentityManagement::IdentityManager *PluginEditorCheckBeforeSendInterface::identityManagement() const
-{
- return d->mIdentityManagement;
-}
-
void PluginEditorCheckBeforeSendInterface::setParameters(const MessageComposer::PluginEditorCheckBeforeSendParams &params)
{
d->parameters = params;
diff --git a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
index 0bd24ff..b7c4700 100644
--- a/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
+++ b/messagecomposer/src/plugineditorcheckbeforesend/plugineditorcheckbeforesendinterface.h
@@ -45,9 +45,6 @@ public:
void setParentWidget(QWidget *parent);
QWidget *parentWidget() const;
- void setIdentityManagement(KIdentityManagement::IdentityManager *identityManagement);
- KIdentityManagement::IdentityManager *identityManagement() const;
-
void setParameters(const MessageComposer::PluginEditorCheckBeforeSendParams &params);
MessageComposer::PluginEditorCheckBeforeSendParams parameters() const;
diff --git a/webengineviewer/src/networkmanager/interceptormanager.cpp b/webengineviewer/src/networkmanager/interceptormanager.cpp
index 861314c..e6e4448 100644
--- a/webengineviewer/src/networkmanager/interceptormanager.cpp
+++ b/webengineviewer/src/networkmanager/interceptormanager.cpp
@@ -70,8 +70,3 @@ QList<QAction *> InterceptorManager::interceptorUrlActions(const WebEngineViewer
}
return actions;
}
-
-QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> InterceptorManager::configureInterceptorList(QWidget *parent) const
-{
- return d->mManager->configureInterceptorList(parent);
-}
diff --git a/webengineviewer/src/networkmanager/interceptormanager.h b/webengineviewer/src/networkmanager/interceptormanager.h
index ad93667..1adbb7b 100644
--- a/webengineviewer/src/networkmanager/interceptormanager.h
+++ b/webengineviewer/src/networkmanager/interceptormanager.h
@@ -40,7 +40,6 @@ public:
~InterceptorManager();
void addInterceptor(WebEngineViewer::NetworkPluginUrlInterceptorInterface *interceptor);
QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
- QVector<WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent = Q_NULLPTR) const;
private:
NetworkAccessManagerWebEnginePrivate *const d;
};
diff --git a/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.cpp b/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.cpp
index a728bae..1f335c3 100644
--- a/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.cpp
+++ b/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.cpp
@@ -43,12 +43,6 @@ void NetworkPluginUrlInterceptor::showConfigureDialog(QWidget *parent)
Q_UNUSED(parent);
}
-NetworkPluginUrlInterceptorConfigureWidgetSetting NetworkPluginUrlInterceptor::createConfigureWidget(QWidget *parent)
-{
- Q_UNUSED(parent);
- return {};
-}
-
void NetworkPluginUrlInterceptor::setIsEnabled(bool enabled)
{
mIsEnabled = enabled;
diff --git a/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.h b/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.h
index b622bd8..3ee112c 100644
--- a/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.h
+++ b/webengineviewer/src/urlinterceptor/networkpluginurlinterceptor.h
@@ -25,25 +25,7 @@
class QWebEngineView;
namespace WebEngineViewer
{
-class NetworkPluginUrlInterceptorConfigureWidget;
class NetworkPluginUrlInterceptorInterface;
-struct WEBENGINEVIEWER_EXPORT NetworkPluginUrlInterceptorConfigureWidgetSetting {
- NetworkPluginUrlInterceptorConfigureWidgetSetting()
- : configureWidget(Q_NULLPTR)
- {
-
- }
-
- NetworkPluginUrlInterceptorConfigureWidgetSetting(WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidget *w, const QString &widgetName)
- : name(widgetName),
- configureWidget(w)
- {
-
- }
-
- QString name;
- WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidget *configureWidget;
-};
class WEBENGINEVIEWER_EXPORT NetworkPluginUrlInterceptor : public QObject
{
@@ -56,8 +38,6 @@ public:
virtual bool hasConfigureDialog() const;
virtual void showConfigureDialog(QWidget *parent = Q_NULLPTR);
- virtual NetworkPluginUrlInterceptorConfigureWidgetSetting createConfigureWidget(QWidget *parent = Q_NULLPTR);
-
void setIsEnabled(bool enabled);
bool isEnabled() const;
@@ -66,5 +46,4 @@ private:
};
}
-Q_DECLARE_TYPEINFO(WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting, Q_MOVABLE_TYPE);
#endif // MAILNETWORKPLUGINURLINTERCEPTOR_H
diff --git a/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp b/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp
index ed6db5c..9bc8ece 100644
--- a/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp
+++ b/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp
@@ -35,7 +35,6 @@ public:
}
QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
- QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent) const;
void createInterfaces(QWebEngineView *webEngine, KActionCollection *ac);
QVector<WebEngineViewer::NetworkPluginUrlInterceptorInterface *> mListInterface;
private:
@@ -51,17 +50,6 @@ QList<QAction *> NetworkUrlInterceptorManagerPrivate::interceptorUrlActions(cons
return lstActions;
}
-QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> NetworkUrlInterceptorManagerPrivate::configureInterceptorList(QWidget *parent) const
-{
- QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> lstConfigureWidget;
- Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
- if (plugin->hasConfigureDialog() && plugin->isEnabled()) {
- lstConfigureWidget.append(plugin->createConfigureWidget(parent));
- }
- }
- return lstConfigureWidget;
-}
-
void NetworkUrlInterceptorManagerPrivate::createInterfaces(QWebEngineView *webEngine, KActionCollection *ac)
{
Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
@@ -94,9 +82,3 @@ QList<QAction *> NetworkUrlInterceptorManager::interceptorUrlActions(const WebEn
{
return d->interceptorUrlActions(result);
}
-
-QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> NetworkUrlInterceptorManager::configureInterceptorList(QWidget *parent) const
-{
- return d->configureInterceptorList(parent);
-}
-
diff --git a/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.h b/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.h
index 2d28321..3f9e6d0 100644
--- a/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.h
+++ b/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.h
@@ -41,7 +41,6 @@ public:
QVector<NetworkPluginUrlInterceptorInterface *> interfaceList() const;
QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
- QVector<WebEngineViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent) const;
private:
NetworkUrlInterceptorManagerPrivate *const d;
};