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