Commit 07986cb3 authored by Laurent Montel's avatar Laurent Montel 😁

We need configurewidget info

parent eb94dc91
...@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) ...@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory) include(ECMQtDeclareLoggingCategory)
include(ECMAddTests) include(ECMAddTests)
set(MESSAGELIB_LIB_VERSION "5.2.48") set(MESSAGELIB_LIB_VERSION "5.2.49")
set(KF5_VERSION "5.19.0") set(KF5_VERSION "5.19.0")
set(KDEPIMLIBS_LIB_VERSION "5.2.40") set(KDEPIMLIBS_LIB_VERSION "5.2.40")
......
...@@ -69,7 +69,7 @@ QList<QAction *> NetworkAccessManagerWebEngine::actions() const ...@@ -69,7 +69,7 @@ QList<QAction *> NetworkAccessManagerWebEngine::actions() const
return actions; return actions;
} }
QList<MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *> NetworkAccessManagerWebEngine::configureInterceptorList(QWidget *parent) const QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> NetworkAccessManagerWebEngine::configureInterceptorList(QWidget *parent) const
{ {
return d->mManager->configureInterceptorList(parent); return d->mManager->configureInterceptorList(parent);
} }
...@@ -28,6 +28,7 @@ namespace MessageViewer ...@@ -28,6 +28,7 @@ namespace MessageViewer
class NetworkPluginUrlInterceptorInterface; class NetworkPluginUrlInterceptorInterface;
class NetworkAccessManagerWebEnginePrivate; class NetworkAccessManagerWebEnginePrivate;
class NetworkPluginUrlInterceptorConfigureWidget; class NetworkPluginUrlInterceptorConfigureWidget;
class NetworkPluginUrlInterceptorConfigureWidgetSetting;
class MESSAGEVIEWER_EXPORT NetworkAccessManagerWebEngine : public QNetworkAccessManager class MESSAGEVIEWER_EXPORT NetworkAccessManagerWebEngine : public QNetworkAccessManager
{ {
Q_OBJECT Q_OBJECT
...@@ -36,7 +37,7 @@ public: ...@@ -36,7 +37,7 @@ public:
~NetworkAccessManagerWebEngine(); ~NetworkAccessManagerWebEngine();
void addInterceptor(MessageViewer::NetworkPluginUrlInterceptorInterface *interceptor); void addInterceptor(MessageViewer::NetworkPluginUrlInterceptorInterface *interceptor);
QList<QAction *> actions() const; QList<QAction *> actions() const;
QList<MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *> configureInterceptorList(QWidget *parent = Q_NULLPTR) const; QVector<MessageViewer::NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent = Q_NULLPTR) const;
private: private:
NetworkAccessManagerWebEnginePrivate *const d; NetworkAccessManagerWebEnginePrivate *const d;
}; };
......
...@@ -35,7 +35,7 @@ bool NetworkPluginUrlInterceptor::hasConfigureSupport() const ...@@ -35,7 +35,7 @@ bool NetworkPluginUrlInterceptor::hasConfigureSupport() const
return false; return false;
} }
NetworkPluginUrlInterceptorConfigureWidget *NetworkPluginUrlInterceptor::createConfigureWidget(QWidget *parent) NetworkPluginUrlInterceptorConfigureWidgetSetting NetworkPluginUrlInterceptor::createConfigureWidget(QWidget *parent)
{ {
Q_UNUSED(parent); Q_UNUSED(parent);
return {}; return {};
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
virtual NetworkPluginUrlInterceptorInterface *createInterface(QWebEngineView *webEngine, QObject *parent = Q_NULLPTR) = 0; virtual NetworkPluginUrlInterceptorInterface *createInterface(QWebEngineView *webEngine, QObject *parent = Q_NULLPTR) = 0;
virtual bool hasConfigureSupport() const; virtual bool hasConfigureSupport() const;
virtual MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *createConfigureWidget(QWidget *parent = Q_NULLPTR); virtual NetworkPluginUrlInterceptorConfigureWidgetSetting createConfigureWidget(QWidget *parent = Q_NULLPTR);
}; };
} }
#endif // MAILNETWORKPLUGINURLINTERCEPTOR_H #endif // MAILNETWORKPLUGINURLINTERCEPTOR_H
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
} }
QList<QAction *> actions() const; QList<QAction *> actions() const;
QList<NetworkPluginUrlInterceptorConfigureWidget *> configureInterceptorList(QWidget *parent) const; QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent) const;
void createInterfaces(QWebEngineView *webEngine, KActionCollection *ac); void createInterfaces(QWebEngineView *webEngine, KActionCollection *ac);
QVector<MessageViewer::NetworkPluginUrlInterceptorInterface *> mListInterface; QVector<MessageViewer::NetworkPluginUrlInterceptorInterface *> mListInterface;
QList<QAction *> mActionList; QList<QAction *> mActionList;
...@@ -43,9 +43,9 @@ QList<QAction *> NetworkUrlInterceptorManagerPrivate::actions() const ...@@ -43,9 +43,9 @@ QList<QAction *> NetworkUrlInterceptorManagerPrivate::actions() const
return mActionList; return mActionList;
} }
QList<NetworkPluginUrlInterceptorConfigureWidget *> NetworkUrlInterceptorManagerPrivate::configureInterceptorList(QWidget *parent) const QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> NetworkUrlInterceptorManagerPrivate::configureInterceptorList(QWidget *parent) const
{ {
QList<NetworkPluginUrlInterceptorConfigureWidget *> lstConfigureWidget; QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> lstConfigureWidget;
Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) { Q_FOREACH (NetworkPluginUrlInterceptor *plugin, NetworkUrlInterceptorPluginManager::self()->pluginsList()) {
if (plugin->hasConfigureSupport()) { if (plugin->hasConfigureSupport()) {
lstConfigureWidget.append(plugin->createConfigureWidget(parent)); lstConfigureWidget.append(plugin->createConfigureWidget(parent));
...@@ -86,7 +86,7 @@ QList<QAction *> NetworkUrlInterceptorManager::actions() const ...@@ -86,7 +86,7 @@ QList<QAction *> NetworkUrlInterceptorManager::actions() const
return d->actions(); return d->actions();
} }
QList<NetworkPluginUrlInterceptorConfigureWidget *> NetworkUrlInterceptorManager::configureInterceptorList(QWidget *parent) const QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> NetworkUrlInterceptorManager::configureInterceptorList(QWidget *parent) const
{ {
return d->configureInterceptorList(parent); return d->configureInterceptorList(parent);
} }
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <QObject> #include <QObject>
#include <messageviewer/networkpluginurlinterceptor.h> #include <messageviewer/networkpluginurlinterceptor.h>
#include "messageviewer_export.h" #include "messageviewer_export.h"
#include <QVector>
namespace MessageViewer namespace MessageViewer
{ {
...@@ -34,7 +35,7 @@ public: ...@@ -34,7 +35,7 @@ public:
QVector<NetworkPluginUrlInterceptorInterface *> interfaceList() const; QVector<NetworkPluginUrlInterceptorInterface *> interfaceList() const;
QList<QAction *> actions() const; QList<QAction *> actions() const;
QList<MessageViewer::NetworkPluginUrlInterceptorConfigureWidget *> configureInterceptorList(QWidget *parent) const; QVector<NetworkPluginUrlInterceptorConfigureWidgetSetting> configureInterceptorList(QWidget *parent) const;
private: private:
NetworkUrlInterceptorManagerPrivate *const d; 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