summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-08 19:15:04 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-08 19:15:04 (GMT)
commite00683f25de08f101bce7eb73210e49613f59596 (patch)
treef54f41e30f0b619c1b166aa55097e1f08e6ab391
parentdbdd09a329d8c7082b7ef0d2ef23c9f589dd15fc (diff)
Allow to enable/disable NetworkUrlInterceptorPlugin
-rw-r--r--CMakeLists.txt2
-rw-r--r--webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp1
-rw-r--r--webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp24
-rw-r--r--webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.h2
4 files changed, 28 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fe067c..c2dab18 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.53")
+set(PIM_VERSION "5.3.54")
set(MESSAGELIB_LIB_VERSION ${PIM_VERSION})
set(AKONADIMIME_LIB_VERSION "5.3.40")
diff --git a/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp b/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp
index b8ee5a4..524ea1a 100644
--- a/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp
+++ b/webengineviewer/src/urlinterceptor/networkurlinterceptormanager.cpp
@@ -38,6 +38,7 @@ public:
QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent) const;
void createInterfaces(QWebEngineView *webEngine, KActionCollection *ac);
QVector<WebEngineViewer::NetworkPluginUrlInterceptorInterface *> mListInterface;
+private:
NetworkUrlInterceptorManager *q;
};
diff --git a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
index ff54112..598ce02 100644
--- a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
+++ b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.cpp
@@ -87,11 +87,24 @@ public:
void loadPlugin(MailNetworkUrlInterceptorPluginInfo *item);
QVector<WebEngineViewer::NetworkPluginUrlInterceptor *> pluginsList() const;
+ QString configGroupName() const;
+ QString configPrefixSettingKey() const;
QVector<MailNetworkUrlInterceptorPluginInfo> mPluginList;
+private:
NetworkUrlInterceptorPluginManager *q;
};
+QString NetworkUrlInterceptorPluginManagerPrivate::configGroupName() const
+{
+ return QStringLiteral("NetworkUrlInterceptorPlugins");
+}
+
+QString NetworkUrlInterceptorPluginManagerPrivate::configPrefixSettingKey() const
+{
+ return QStringLiteral("PluginsNetworkUrlInterceptor");
+}
+
void NetworkUrlInterceptorPluginManagerPrivate::initializePluginList()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("webengineviewer"), [](const KPluginMetaData & md) {
@@ -166,3 +179,14 @@ QVector<WebEngineViewer::NetworkPluginUrlInterceptor *> NetworkUrlInterceptorPlu
{
return d->pluginsList();
}
+
+QString NetworkUrlInterceptorPluginManager::configGroupName() const
+{
+ return d->configGroupName();
+}
+
+QString NetworkUrlInterceptorPluginManager::configPrefixSettingKey() const
+{
+ return d->configPrefixSettingKey();
+}
+
diff --git a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.h b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.h
index deae5cb..720d2b9 100644
--- a/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.h
+++ b/webengineviewer/src/urlinterceptor/networkurlinterceptorpluginmanager.h
@@ -36,6 +36,8 @@ public:
~NetworkUrlInterceptorPluginManager();
QVector<WebEngineViewer::NetworkPluginUrlInterceptor *> pluginsList() const;
+ QString configGroupName() const;
+ QString configPrefixSettingKey() const;
private:
NetworkUrlInterceptorPluginManagerPrivate *const d;
};