mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 02:52:12 +01:00
PluginInterface: Don't pass enum as constref
This commit is contained in:
parent
1cf47bfdb5
commit
13c9025c40
|
@ -52,19 +52,19 @@ public:
|
||||||
virtual void populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTestResult &r) { Q_UNUSED(menu) Q_UNUSED(view) Q_UNUSED(r) }
|
virtual void populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTestResult &r) { Q_UNUSED(menu) Q_UNUSED(view) Q_UNUSED(r) }
|
||||||
virtual void populateExtensionsMenu(QMenu *menu) { Q_UNUSED(menu) }
|
virtual void populateExtensionsMenu(QMenu *menu) { Q_UNUSED(menu) }
|
||||||
|
|
||||||
virtual bool mouseDoubleClick(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
virtual bool mouseDoubleClick(Qz::ObjectName type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
||||||
virtual bool mousePress(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
virtual bool mousePress(Qz::ObjectName type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
||||||
virtual bool mouseRelease(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
virtual bool mouseRelease(Qz::ObjectName type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
||||||
virtual bool mouseMove(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
virtual bool mouseMove(Qz::ObjectName type, QObject* obj, QMouseEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
||||||
|
|
||||||
virtual bool wheelEvent(const Qz::ObjectName &type, QObject* obj, QWheelEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
virtual bool wheelEvent(Qz::ObjectName type, QObject* obj, QWheelEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
||||||
|
|
||||||
virtual bool keyPress(const Qz::ObjectName &type, QObject* obj, QKeyEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
virtual bool keyPress(Qz::ObjectName type, QObject* obj, QKeyEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
||||||
virtual bool keyRelease(const Qz::ObjectName &type, QObject* obj, QKeyEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
virtual bool keyRelease(Qz::ObjectName type, QObject* obj, QKeyEvent* event) { Q_UNUSED(type) Q_UNUSED(obj) Q_UNUSED(event) return false; }
|
||||||
|
|
||||||
virtual bool acceptNavigationRequest(WebPage *page, const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) { Q_UNUSED(page); Q_UNUSED(url); Q_UNUSED(type); Q_UNUSED(isMainFrame); return true; }
|
virtual bool acceptNavigationRequest(WebPage *page, const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) { Q_UNUSED(page); Q_UNUSED(url); Q_UNUSED(type); Q_UNUSED(isMainFrame); return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_INTERFACE(PluginInterface, "Falkon.Browser.PluginInterface/2.1")
|
Q_DECLARE_INTERFACE(PluginInterface, "Falkon.Browser.PluginInterface/2.2")
|
||||||
|
|
||||||
#endif // PLUGININTERFACE_H
|
#endif // PLUGININTERFACE_H
|
||||||
|
|
|
@ -77,7 +77,7 @@ void AutoScrollPlugin::showSettings(QWidget* parent)
|
||||||
m_settings.data()->raise();
|
m_settings.data()->raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutoScrollPlugin::mouseMove(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool AutoScrollPlugin::mouseMove(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
return m_scroller->mouseMove(obj, event);
|
return m_scroller->mouseMove(obj, event);
|
||||||
|
@ -86,7 +86,7 @@ bool AutoScrollPlugin::mouseMove(const Qz::ObjectName &type, QObject* obj, QMous
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutoScrollPlugin::mousePress(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool AutoScrollPlugin::mousePress(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
return m_scroller->mousePress(obj, event);
|
return m_scroller->mousePress(obj, event);
|
||||||
|
@ -95,7 +95,7 @@ bool AutoScrollPlugin::mousePress(const Qz::ObjectName &type, QObject* obj, QMou
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutoScrollPlugin::mouseRelease(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool AutoScrollPlugin::mouseRelease(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
return m_scroller->mouseRelease(obj, event);
|
return m_scroller->mouseRelease(obj, event);
|
||||||
|
@ -104,7 +104,7 @@ bool AutoScrollPlugin::mouseRelease(const Qz::ObjectName &type, QObject* obj, QM
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutoScrollPlugin::wheelEvent(const Qz::ObjectName &type, QObject *obj, QWheelEvent *event)
|
bool AutoScrollPlugin::wheelEvent(Qz::ObjectName type, QObject *obj, QWheelEvent *event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
return m_scroller->wheel(obj, event);
|
return m_scroller->wheel(obj, event);
|
||||||
|
|
|
@ -39,10 +39,10 @@ public:
|
||||||
QTranslator *getTranslator(const QString &locale) override;
|
QTranslator *getTranslator(const QString &locale) override;
|
||||||
void showSettings(QWidget *parent) override;
|
void showSettings(QWidget *parent) override;
|
||||||
|
|
||||||
bool mouseMove(const Qz::ObjectName &type, QObject *obj, QMouseEvent *event) override;
|
bool mouseMove(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override;
|
||||||
bool mousePress(const Qz::ObjectName &type, QObject *obj, QMouseEvent *event) override;
|
bool mousePress(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override;
|
||||||
bool mouseRelease(const Qz::ObjectName &type, QObject *obj, QMouseEvent *event) override;
|
bool mouseRelease(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override;
|
||||||
bool wheelEvent(const Qz::ObjectName &type, QObject *obj, QWheelEvent *event) override;
|
bool wheelEvent(Qz::ObjectName type, QObject *obj, QWheelEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AutoScroller* m_scroller;
|
AutoScroller* m_scroller;
|
||||||
|
|
|
@ -71,7 +71,7 @@ void MouseGesturesPlugin::showSettings(QWidget* parent)
|
||||||
m_gestures->showSettings(parent);
|
m_gestures->showSettings(parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MouseGesturesPlugin::mousePress(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool MouseGesturesPlugin::mousePress(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
m_gestures->mousePress(obj, event);
|
m_gestures->mousePress(obj, event);
|
||||||
|
@ -80,7 +80,7 @@ bool MouseGesturesPlugin::mousePress(const Qz::ObjectName &type, QObject* obj, Q
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MouseGesturesPlugin::mouseRelease(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool MouseGesturesPlugin::mouseRelease(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
return m_gestures->mouseRelease(obj, event);
|
return m_gestures->mouseRelease(obj, event);
|
||||||
|
@ -89,7 +89,7 @@ bool MouseGesturesPlugin::mouseRelease(const Qz::ObjectName &type, QObject* obj,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MouseGesturesPlugin::mouseMove(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool MouseGesturesPlugin::mouseMove(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
m_gestures->mouseMove(obj, event);
|
m_gestures->mouseMove(obj, event);
|
||||||
|
|
|
@ -37,9 +37,9 @@ public:
|
||||||
QTranslator *getTranslator(const QString &locale) override;
|
QTranslator *getTranslator(const QString &locale) override;
|
||||||
void showSettings(QWidget *parent) override;
|
void showSettings(QWidget *parent) override;
|
||||||
|
|
||||||
bool mousePress(const Qz::ObjectName &type, QObject *obj, QMouseEvent *event) override;
|
bool mousePress(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override;
|
||||||
bool mouseRelease(const Qz::ObjectName &type, QObject *obj, QMouseEvent *event) override;
|
bool mouseRelease(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override;
|
||||||
bool mouseMove(const Qz::ObjectName &type, QObject *obj, QMouseEvent *event) override;
|
bool mouseMove(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MouseGestures* m_gestures;
|
MouseGestures* m_gestures;
|
||||||
|
|
|
@ -79,7 +79,7 @@ void PIM_Plugin::populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTes
|
||||||
m_handler->populateWebViewMenu(menu, view, r);
|
m_handler->populateWebViewMenu(menu, view, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PIM_Plugin::keyPress(const Qz::ObjectName &type, QObject* obj, QKeyEvent* event)
|
bool PIM_Plugin::keyPress(Qz::ObjectName type, QObject* obj, QKeyEvent* event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_WebView) {
|
if (type == Qz::ON_WebView) {
|
||||||
WebView* view = qobject_cast<WebView*>(obj);
|
WebView* view = qobject_cast<WebView*>(obj);
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
void showSettings(QWidget *parent) override;
|
void showSettings(QWidget *parent) override;
|
||||||
|
|
||||||
void populateWebViewMenu(QMenu *menu, WebView *view, const WebHitTestResult &r) override;
|
void populateWebViewMenu(QMenu *menu, WebView *view, const WebHitTestResult &r) override;
|
||||||
bool keyPress(const Qz::ObjectName &type, QObject *obj, QKeyEvent *event) override;
|
bool keyPress(Qz::ObjectName type, QObject *obj, QKeyEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PIM_Handler* m_handler;
|
PIM_Handler* m_handler;
|
||||||
|
|
|
@ -156,7 +156,7 @@ void TestPlugin::populateWebViewMenu(QMenu* menu, WebView* view, const WebHitTes
|
||||||
menu->addAction(tr("My first plugin action") + title, this, SLOT(actionSlot()));
|
menu->addAction(tr("My first plugin action") + title, this, SLOT(actionSlot()));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TestPlugin::mousePress(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool TestPlugin::mousePress(Qz::ObjectName type, QObject* obj, QMouseEvent* event)
|
||||||
{
|
{
|
||||||
qDebug() << "mousePress" << type << obj << event;
|
qDebug() << "mousePress" << type << obj << event;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
void showSettings(QWidget *parent) override;
|
void showSettings(QWidget *parent) override;
|
||||||
|
|
||||||
void populateWebViewMenu(QMenu *menu, WebView *view, const WebHitTestResult &r) override;
|
void populateWebViewMenu(QMenu *menu, WebView *view, const WebHitTestResult &r) override;
|
||||||
bool mousePress(const Qz::ObjectName &type, QObject *obj, QMouseEvent *event) override;
|
bool mousePress(Qz::ObjectName type, QObject *obj, QMouseEvent *event) override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void actionSlot();
|
void actionSlot();
|
||||||
|
|
|
@ -105,7 +105,7 @@ void VerticalTabsPlugin::showSettings(QWidget *parent)
|
||||||
settings->exec();
|
settings->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VerticalTabsPlugin::keyPress(const Qz::ObjectName &type, QObject *obj, QKeyEvent *event)
|
bool VerticalTabsPlugin::keyPress(Qz::ObjectName type, QObject *obj, QKeyEvent *event)
|
||||||
{
|
{
|
||||||
if (type == Qz::ON_TabWidget) {
|
if (type == Qz::ON_TabWidget) {
|
||||||
return m_controller->handleKeyPress(event, static_cast<TabWidget*>(obj));
|
return m_controller->handleKeyPress(event, static_cast<TabWidget*>(obj));
|
||||||
|
|
|
@ -39,7 +39,7 @@ public:
|
||||||
bool testPlugin() override;
|
bool testPlugin() override;
|
||||||
QTranslator* getTranslator(const QString &locale) override;
|
QTranslator* getTranslator(const QString &locale) override;
|
||||||
void showSettings(QWidget *parent = nullptr) override;
|
void showSettings(QWidget *parent = nullptr) override;
|
||||||
bool keyPress(const Qz::ObjectName &type, QObject *obj, QKeyEvent *event) override;
|
bool keyPress(Qz::ObjectName type, QObject *obj, QKeyEvent *event) override;
|
||||||
|
|
||||||
enum ViewType {
|
enum ViewType {
|
||||||
TabListView,
|
TabListView,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user