mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
[Qt5] Ported all plugins to Qt5 plugin system
This commit is contained in:
parent
51f1c73d20
commit
7e6802ba35
|
@ -17,7 +17,4 @@ TEMPLATE = subdirs
|
|||
SUBDIRS = src/lib src/main
|
||||
CONFIG += ordered
|
||||
|
||||
# TODO: Fix plugins for Qt5
|
||||
!isEqual(QT_MAJOR_VERSION, 5) {
|
||||
SUBDIRS += src/plugins
|
||||
}
|
||||
SUBDIRS += src/plugins
|
||||
|
|
|
@ -53,6 +53,6 @@ private:
|
|||
BookmarkView m_viewType;
|
||||
|
||||
signals:
|
||||
void requestNewFolder(QWidget*,QString*,bool,QString,WebView*);
|
||||
void requestNewFolder(QWidget*, QString*, bool, QString, WebView*);
|
||||
};
|
||||
#endif // BOOKMARKSTREE_H
|
||||
|
|
|
@ -91,4 +91,6 @@ bool AKN_Plugin::keyPress(const Qz::ObjectName &type, QObject* obj, QKeyEvent* e
|
|||
return false;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(AccessKeysNavigation, AKN_Plugin)
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,10 @@ class AKN_Plugin : public QObject, public PluginInterface
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(PluginInterface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "QupZilla.Browser.plugin.AKN")
|
||||
#endif
|
||||
|
||||
public:
|
||||
AKN_Plugin();
|
||||
PluginSpec pluginSpec();
|
||||
|
|
|
@ -98,4 +98,6 @@ void GM_Plugin::webPageCreated(WebPage* page)
|
|||
connect(page->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), m_manager, SLOT(pageLoadStart()));
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(GreaseMonkey, GM_Plugin)
|
||||
#endif
|
||||
|
|
|
@ -28,6 +28,10 @@ class GM_Plugin : public QObject, public PluginInterface
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(PluginInterface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "QupZilla.Browser.plugin.GreaseMonkey")
|
||||
#endif
|
||||
|
||||
public:
|
||||
explicit GM_Plugin();
|
||||
PluginSpec pluginSpec();
|
||||
|
|
|
@ -106,4 +106,6 @@ bool MouseGesturesPlugin::mouseMove(const Qz::ObjectName &type, QObject* obj, QM
|
|||
return false;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(MouseGestures, MouseGesturesPlugin)
|
||||
#endif
|
||||
|
|
|
@ -26,6 +26,10 @@ class MouseGesturesPlugin : public QObject, public PluginInterface
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(PluginInterface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "QupZilla.Browser.plugin.MouseGestures")
|
||||
#endif
|
||||
|
||||
public:
|
||||
MouseGesturesPlugin();
|
||||
PluginSpec pluginSpec();
|
||||
|
|
|
@ -95,4 +95,6 @@ bool PIM_Plugin::keyPress(const Qz::ObjectName &type, QObject* obj, QKeyEvent* e
|
|||
return false;
|
||||
}
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(PIM, PIM_Plugin)
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,10 @@ class PIM_Plugin : public QObject, public PluginInterface
|
|||
Q_OBJECT
|
||||
Q_INTERFACES(PluginInterface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "QupZilla.Browser.plugin.PIM")
|
||||
#endif
|
||||
|
||||
public:
|
||||
PIM_Plugin();
|
||||
PluginSpec pluginSpec();
|
||||
|
|
|
@ -173,4 +173,7 @@ void TestPlugin::actionSlot()
|
|||
// Export plugin macro
|
||||
// This macro has to be only in class derived from PluginInterface
|
||||
// Don't call it in other files!
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
Q_EXPORT_PLUGIN2(ExamplePlugin, TestPlugin)
|
||||
#endif
|
||||
|
|
|
@ -31,13 +31,17 @@
|
|||
#include <QMessageBox>
|
||||
#include <QWebElement>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWeakPointer>
|
||||
#include <QPointer>
|
||||
|
||||
class TestPlugin : public QObject, public PluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(PluginInterface)
|
||||
|
||||
#if QT_VERSION >= 0x050000
|
||||
Q_PLUGIN_METADATA(IID "QupZilla.Browser.plugin.TestPlugin")
|
||||
#endif
|
||||
|
||||
public:
|
||||
explicit TestPlugin();
|
||||
PluginSpec pluginSpec();
|
||||
|
@ -57,7 +61,7 @@ private slots:
|
|||
void actionSlot();
|
||||
|
||||
private:
|
||||
QWeakPointer<QDialog> m_settings;
|
||||
QPointer<QDialog> m_settings;
|
||||
|
||||
WebView* m_view;
|
||||
QString m_settingsPath;
|
||||
|
|
Loading…
Reference in New Issue
Block a user