Commit 7e5ee9fe authored by Laurent Montel's avatar Laurent Montel 😁

Fix typo

parent 3f532db9
......@@ -15,22 +15,22 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mailnetworkpluginulrinterceptor.h"
#include "mailnetworkpluginurlinterceptor.h"
using namespace MessageViewer;
MailNetworkPluginUlrInterceptor::MailNetworkPluginUlrInterceptor(QObject *parent)
MailNetworkPluginUrlInterceptor::MailNetworkPluginUrlInterceptor(QObject *parent)
: QObject(parent)
{
}
MailNetworkPluginUlrInterceptor::~MailNetworkPluginUlrInterceptor()
MailNetworkPluginUrlInterceptor::~MailNetworkPluginUrlInterceptor()
{
}
bool MailNetworkPluginUlrInterceptor::hasConfigureSupport() const
bool MailNetworkPluginUrlInterceptor::hasConfigureSupport() const
{
return false;
}
......@@ -15,23 +15,23 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MAILNETWORKPLUGINULRINTERCEPTOR_H
#define MAILNETWORKPLUGINULRINTERCEPTOR_H
#ifndef MAILNETWORKPLUGINURLINTERCEPTOR_H
#define MAILNETWORKPLUGINURLINTERCEPTOR_H
#include <QObject>
#include "messageviewer_export.h"
namespace MessageViewer
{
class MailNetworkPluginUlrInterceptorInterface;
class MESSAGEVIEWER_EXPORT MailNetworkPluginUlrInterceptor : public QObject
class MailNetworkPluginUrlInterceptorInterface;
class MESSAGEVIEWER_EXPORT MailNetworkPluginUrlInterceptor : public QObject
{
Q_OBJECT
public:
explicit MailNetworkPluginUlrInterceptor(QObject *parent = Q_NULLPTR);
~MailNetworkPluginUlrInterceptor();
virtual MailNetworkPluginUlrInterceptorInterface *createInterface(QObject *parent = Q_NULLPTR) = 0;
explicit MailNetworkPluginUrlInterceptor(QObject *parent = Q_NULLPTR);
~MailNetworkPluginUrlInterceptor();
virtual MailNetworkPluginUrlInterceptorInterface *createInterface(QObject *parent = Q_NULLPTR) = 0;
virtual bool hasConfigureSupport() const;
};
}
#endif // MAILNETWORKPLUGINULRINTERCEPTOR_H
#endif // MAILNETWORKPLUGINURLINTERCEPTOR_H
......@@ -15,17 +15,17 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mailnetworkpluginulrinterceptorinterface.h"
#include "mailnetworkpluginurlinterceptorinterface.h"
using namespace MessageViewer;
MailNetworkPluginUlrInterceptorInterface::MailNetworkPluginUlrInterceptorInterface(QObject *parent)
MailNetworkPluginUrlInterceptorInterface::MailNetworkPluginUrlInterceptorInterface(QObject *parent)
: QObject(parent)
{
}
MailNetworkPluginUlrInterceptorInterface::~MailNetworkPluginUlrInterceptorInterface()
MailNetworkPluginUrlInterceptorInterface::~MailNetworkPluginUrlInterceptorInterface()
{
}
......@@ -15,22 +15,22 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MAILNETWORKPLUGINULRINTERCEPTORINTERFACE_H
#define MAILNETWORKPLUGINULRINTERCEPTORINTERFACE_H
#ifndef MAILNETWORKPLUGINURLINTERCEPTORINTERFACE_H
#define MAILNETWORKPLUGINURLINTERCEPTORINTERFACE_H
#include <QObject>
#include "messageviewer_export.h"
class QWebEngineUrlRequestInfo;
namespace MessageViewer
{
class MESSAGEVIEWER_EXPORT MailNetworkPluginUlrInterceptorInterface : public QObject
class MESSAGEVIEWER_EXPORT MailNetworkPluginUrlInterceptorInterface : public QObject
{
Q_OBJECT
public:
explicit MailNetworkPluginUlrInterceptorInterface(QObject *parent = Q_NULLPTR);
~MailNetworkPluginUlrInterceptorInterface();
explicit MailNetworkPluginUrlInterceptorInterface(QObject *parent = Q_NULLPTR);
~MailNetworkPluginUrlInterceptorInterface();
virtual void interceptRequest(QWebEngineUrlRequestInfo &info) = 0;
};
}
#endif // MAILNETWORKPLUGINULRINTERCEPTORINTERFACE_H
#endif // MAILNETWORKPLUGINURLINTERCEPTORINTERFACE_H
......@@ -15,27 +15,27 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mailnetworkpluginulrinterceptorinterface.h"
#include "mailnetworkulrinterceptor.h"
#include "mailnetworkpluginurlinterceptorinterface.h"
#include "mailnetworkurlinterceptor.h"
#include "messageviewer_debug.h"
#include <QVector>
using namespace MessageViewer;
class MessageViewer::MailNetworkUlrInterceptorPrivate
class MessageViewer::MailNetworkUrlInterceptorPrivate
{
public:
MailNetworkUlrInterceptorPrivate()
MailNetworkUrlInterceptorPrivate()
{
}
void addInterceptor(MailNetworkPluginUlrInterceptorInterface *interceptor);
void addInterceptor(MailNetworkPluginUrlInterceptorInterface *interceptor);
void interceptRequest(QWebEngineUrlRequestInfo &info);
QVector<MailNetworkPluginUlrInterceptorInterface *> listInterceptor;
QVector<MailNetworkPluginUrlInterceptorInterface *> listInterceptor;
};
void MailNetworkUlrInterceptorPrivate::addInterceptor(MailNetworkPluginUlrInterceptorInterface *interceptor)
void MailNetworkUrlInterceptorPrivate::addInterceptor(MailNetworkPluginUrlInterceptorInterface *interceptor)
{
if (!listInterceptor.contains(interceptor)) {
listInterceptor.append(interceptor);
......@@ -44,31 +44,31 @@ void MailNetworkUlrInterceptorPrivate::addInterceptor(MailNetworkPluginUlrInterc
}
}
void MailNetworkUlrInterceptorPrivate::interceptRequest(QWebEngineUrlRequestInfo &info)
void MailNetworkUrlInterceptorPrivate::interceptRequest(QWebEngineUrlRequestInfo &info)
{
Q_FOREACH(MailNetworkPluginUlrInterceptorInterface *inter, listInterceptor) {
Q_FOREACH(MailNetworkPluginUrlInterceptorInterface *inter, listInterceptor) {
inter->interceptRequest(info);
}
}
MailNetworkUlrInterceptor::MailNetworkUlrInterceptor(QObject *parent)
MailNetworkUrlInterceptor::MailNetworkUrlInterceptor(QObject *parent)
: QWebEngineUrlRequestInterceptor(parent),
d(new MailNetworkUlrInterceptorPrivate)
d(new MailNetworkUrlInterceptorPrivate)
{
}
MailNetworkUlrInterceptor::~MailNetworkUlrInterceptor()
MailNetworkUrlInterceptor::~MailNetworkUrlInterceptor()
{
delete d;
}
void MailNetworkUlrInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
void MailNetworkUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
d->interceptRequest(info);
}
void MailNetworkUlrInterceptor::addInterceptor(MailNetworkPluginUlrInterceptorInterface *interceptor)
void MailNetworkUrlInterceptor::addInterceptor(MailNetworkPluginUrlInterceptorInterface *interceptor)
{
d->addInterceptor(interceptor);
}
......
......@@ -15,28 +15,28 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MAILNETWORKULRINTERCEPTOR_H
#define MAILNETWORKULRINTERCEPTOR_H
#ifndef MAILNETWORKURLINTERCEPTOR_H
#define MAILNETWORKURLINTERCEPTOR_H
#include <QWebEngineUrlRequestInterceptor>
#include "messageviewer_export.h"
namespace MessageViewer
{
class MailNetworkUlrInterceptorPrivate;
class MailNetworkPluginUlrInterceptorInterface;
class MESSAGEVIEWER_EXPORT MailNetworkUlrInterceptor : public QWebEngineUrlRequestInterceptor
class MailNetworkUrlInterceptorPrivate;
class MailNetworkPluginUrlInterceptorInterface;
class MESSAGEVIEWER_EXPORT MailNetworkUrlInterceptor : public QWebEngineUrlRequestInterceptor
{
Q_OBJECT
public:
explicit MailNetworkUlrInterceptor(QObject *parent = Q_NULLPTR);
~MailNetworkUlrInterceptor();
explicit MailNetworkUrlInterceptor(QObject *parent = Q_NULLPTR);
~MailNetworkUrlInterceptor();
void interceptRequest(QWebEngineUrlRequestInfo &info) Q_DECL_OVERRIDE;
void addInterceptor(MailNetworkPluginUlrInterceptorInterface *interceptor);
void addInterceptor(MailNetworkPluginUrlInterceptorInterface *interceptor);
private:
MailNetworkUlrInterceptorPrivate *const d;
MailNetworkUrlInterceptorPrivate *const d;
};
}
#endif // MAILNETWORKULRINTERCEPTOR_H
#endif // MAILNETWORKURLINTERCEPTOR_H
......@@ -15,8 +15,8 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mailnetworkpluginulrinterceptor.h"
#include "mailnetworkulrinterceptorpluginmanager.h"
#include "mailnetworkpluginurlinterceptor.h"
#include "mailnetworkurlinterceptorpluginmanager.h"
#include <KPluginLoader>
#include <KPluginFactory>
......@@ -27,28 +27,28 @@
using namespace MessageViewer;
class MailNetworkUlrInterceptorPluginManagerInstancePrivate
class MailNetworkUrlInterceptorPluginManagerInstancePrivate
{
public:
MailNetworkUlrInterceptorPluginManagerInstancePrivate()
: mailNetworkUrlInterceptorPluginManager(new MailNetworkUlrInterceptorPluginManager)
MailNetworkUrlInterceptorPluginManagerInstancePrivate()
: mailNetworkUrlInterceptorPluginManager(new MailNetworkUrlInterceptorPluginManager)
{
}
~MailNetworkUlrInterceptorPluginManagerInstancePrivate()
~MailNetworkUrlInterceptorPluginManagerInstancePrivate()
{
delete mailNetworkUrlInterceptorPluginManager;
}
MailNetworkUlrInterceptorPluginManager *mailNetworkUrlInterceptorPluginManager;
MailNetworkUrlInterceptorPluginManager *mailNetworkUrlInterceptorPluginManager;
};
Q_GLOBAL_STATIC(MailNetworkUlrInterceptorPluginManagerInstancePrivate, sInstance)
Q_GLOBAL_STATIC(MailNetworkUrlInterceptorPluginManagerInstancePrivate, sInstance)
class MailNetworkUlrInterceptorPluginInfo
class MailNetworkUrlInterceptorPluginInfo
{
public:
MailNetworkUlrInterceptorPluginInfo()
MailNetworkUrlInterceptorPluginInfo()
: plugin(Q_NULLPTR)
{
......@@ -56,10 +56,10 @@ public:
QString saveName() const;
KPluginMetaData metaData;
MessageViewer::MailNetworkPluginUlrInterceptor *plugin;
MessageViewer::MailNetworkPluginUrlInterceptor *plugin;
};
QString MailNetworkUlrInterceptorPluginInfo::saveName() const
QString MailNetworkUrlInterceptorPluginInfo::saveName() const
{
return QFileInfo(metaData.fileName()).baseName();
}
......@@ -72,24 +72,24 @@ QString pluginVersion()
}
}
class MessageViewer::MailNetworkUlrInterceptorPluginManagerPrivate
class MessageViewer::MailNetworkUrlInterceptorPluginManagerPrivate
{
public:
MailNetworkUlrInterceptorPluginManagerPrivate(MailNetworkUlrInterceptorPluginManager *qq)
MailNetworkUrlInterceptorPluginManagerPrivate(MailNetworkUrlInterceptorPluginManager *qq)
: q(qq)
{
}
void initializePluginList();
void loadPlugin(MailNetworkUlrInterceptorPluginInfo *item);
QVector<MessageViewer::MailNetworkPluginUlrInterceptor *> pluginsList() const;
void loadPlugin(MailNetworkUrlInterceptorPluginInfo *item);
QVector<MessageViewer::MailNetworkPluginUrlInterceptor *> pluginsList() const;
QVector<MailNetworkUlrInterceptorPluginInfo> mPluginList;
MailNetworkUlrInterceptorPluginManager *q;
QVector<MailNetworkUrlInterceptorPluginInfo> mPluginList;
MailNetworkUrlInterceptorPluginManager *q;
};
void MailNetworkUlrInterceptorPluginManagerPrivate::initializePluginList()
void MailNetworkUrlInterceptorPluginManagerPrivate::initializePluginList()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("messageviewer"), [](const KPluginMetaData & md) {
return md.serviceTypes().contains(QStringLiteral("MessageViewer/UrlInterceptor"));
......@@ -99,7 +99,7 @@ void MailNetworkUlrInterceptorPluginManagerPrivate::initializePluginList()
i.toBack();
QSet<QString> unique;
while (i.hasPrevious()) {
MailNetworkUlrInterceptorPluginInfo info;
MailNetworkUrlInterceptorPluginInfo info;
info.metaData = i.previous();
const QString version = info.metaData.version();
......@@ -114,17 +114,17 @@ void MailNetworkUlrInterceptorPluginManagerPrivate::initializePluginList()
unique.insert(info.saveName());
}
}
QVector<MailNetworkUlrInterceptorPluginInfo>::iterator end(mPluginList.end());
for (QVector<MailNetworkUlrInterceptorPluginInfo>::iterator it = mPluginList.begin(); it != end; ++it) {
QVector<MailNetworkUrlInterceptorPluginInfo>::iterator end(mPluginList.end());
for (QVector<MailNetworkUrlInterceptorPluginInfo>::iterator it = mPluginList.begin(); it != end; ++it) {
loadPlugin(&(*it));
}
}
QVector<MessageViewer::MailNetworkPluginUlrInterceptor *> MailNetworkUlrInterceptorPluginManagerPrivate::pluginsList() const
QVector<MessageViewer::MailNetworkPluginUrlInterceptor *> MailNetworkUrlInterceptorPluginManagerPrivate::pluginsList() const
{
QVector<MessageViewer::MailNetworkPluginUlrInterceptor *> lst;
QVector<MailNetworkUlrInterceptorPluginInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<MailNetworkUlrInterceptorPluginInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
QVector<MessageViewer::MailNetworkPluginUrlInterceptor *> lst;
QVector<MailNetworkUrlInterceptorPluginInfo>::ConstIterator end(mPluginList.constEnd());
for (QVector<MailNetworkUrlInterceptorPluginInfo>::ConstIterator it = mPluginList.constBegin(); it != end; ++it) {
if ((*it).plugin) {
lst << (*it).plugin;
}
......@@ -132,29 +132,29 @@ QVector<MessageViewer::MailNetworkPluginUlrInterceptor *> MailNetworkUlrIntercep
return lst;
}
void MailNetworkUlrInterceptorPluginManagerPrivate::loadPlugin(MailNetworkUlrInterceptorPluginInfo *item)
void MailNetworkUrlInterceptorPluginManagerPrivate::loadPlugin(MailNetworkUrlInterceptorPluginInfo *item)
{
item->plugin = KPluginLoader(item->metaData.fileName()).factory()->create<MessageViewer::MailNetworkPluginUlrInterceptor>(q, QVariantList() << item->saveName());
item->plugin = KPluginLoader(item->metaData.fileName()).factory()->create<MessageViewer::MailNetworkPluginUrlInterceptor>(q, QVariantList() << item->saveName());
}
MailNetworkUlrInterceptorPluginManager *MailNetworkUlrInterceptorPluginManager::self()
MailNetworkUrlInterceptorPluginManager *MailNetworkUrlInterceptorPluginManager::self()
{
return sInstance->mailNetworkUrlInterceptorPluginManager;
}
MailNetworkUlrInterceptorPluginManager::MailNetworkUlrInterceptorPluginManager(QObject *parent)
MailNetworkUrlInterceptorPluginManager::MailNetworkUrlInterceptorPluginManager(QObject *parent)
: QObject(parent),
d(new MailNetworkUlrInterceptorPluginManagerPrivate(this))
d(new MailNetworkUrlInterceptorPluginManagerPrivate(this))
{
d->initializePluginList();
}
MailNetworkUlrInterceptorPluginManager::~MailNetworkUlrInterceptorPluginManager()
MailNetworkUrlInterceptorPluginManager::~MailNetworkUrlInterceptorPluginManager()
{
delete d;
}
QVector<MessageViewer::MailNetworkPluginUlrInterceptor *> MailNetworkUlrInterceptorPluginManager::pluginsList() const
QVector<MessageViewer::MailNetworkPluginUrlInterceptor *> MailNetworkUrlInterceptorPluginManager::pluginsList() const
{
return d->pluginsList();
}
......@@ -15,28 +15,28 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef MAILNETWORKULRINTERCEPTORPLUGINMANAGER_H
#define MAILNETWORKULRINTERCEPTORPLUGINMANAGER_H
#ifndef MAILNETWORKURLINTERCEPTORPLUGINMANAGER_H
#define MAILNETWORKURLINTERCEPTORPLUGINMANAGER_H
#include <QObject>
#include <QVector>
#include "messageviewer_export.h"
namespace MessageViewer
{
class MailNetworkUlrInterceptorPluginManagerPrivate;
class MailNetworkPluginUlrInterceptor;
class MESSAGEVIEWER_EXPORT MailNetworkUlrInterceptorPluginManager : public QObject
class MailNetworkUrlInterceptorPluginManagerPrivate;
class MailNetworkPluginUrlInterceptor;
class MESSAGEVIEWER_EXPORT MailNetworkUrlInterceptorPluginManager : public QObject
{
Q_OBJECT
public:
static MailNetworkUlrInterceptorPluginManager *self();
explicit MailNetworkUlrInterceptorPluginManager(QObject *parent = Q_NULLPTR);
~MailNetworkUlrInterceptorPluginManager();
static MailNetworkUrlInterceptorPluginManager *self();
explicit MailNetworkUrlInterceptorPluginManager(QObject *parent = Q_NULLPTR);
~MailNetworkUrlInterceptorPluginManager();
QVector<MessageViewer::MailNetworkPluginUlrInterceptor *> pluginsList() const;
QVector<MessageViewer::MailNetworkPluginUrlInterceptor *> pluginsList() const;
private:
MailNetworkUlrInterceptorPluginManagerPrivate *const d;
MailNetworkUrlInterceptorPluginManagerPrivate *const d;
};
}
#endif // MAILNETWORKULRINTERCEPTORPLUGINMANAGER_H
#endif // MAILNETWORKURLINTERCEPTORPLUGINMANAGER_H
......@@ -16,7 +16,7 @@
*/
#include "mailnetworkurlinterceptormanager.h"
#include "mailnetworkulrinterceptorpluginmanager.h"
#include "mailnetworkurlinterceptorpluginmanager.h"
#include <QWebEngineProfile>
......
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