mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed loading of plugins. Regression from previous commit.
This commit is contained in:
parent
2e3cc19ac5
commit
5c2befabff
@ -34,7 +34,7 @@
|
||||
#include <QWebFrame>
|
||||
#include <QClipboard>
|
||||
|
||||
WebSearchBar_Button::WebSearchBar_Button(QWidget *parent)
|
||||
WebSearchBar_Button::WebSearchBar_Button(QWidget* parent)
|
||||
: ClickableLabel(parent)
|
||||
{
|
||||
setObjectName("websearchbar-searchbutton");
|
||||
@ -42,7 +42,7 @@ WebSearchBar_Button::WebSearchBar_Button(QWidget *parent)
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
}
|
||||
|
||||
void WebSearchBar_Button::contextMenuEvent(QContextMenuEvent *event)
|
||||
void WebSearchBar_Button::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
event->accept();
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
explicit WebSearchBar_Button(QWidget* parent = 0);
|
||||
|
||||
private:
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent* event);
|
||||
};
|
||||
|
||||
class QT_QUPZILLA_EXPORT WebSearchBar : public LineEdit
|
||||
|
@ -53,11 +53,12 @@ PageScreen::PageScreen(WebView* view, QWidget* parent)
|
||||
void PageScreen::dialogAccepted()
|
||||
{
|
||||
const QString &path = QFileDialog::getSaveFileName(this, tr("Save Page Screen..."),
|
||||
QString("%1.png").arg(qz_filterCharsFromFilename(m_pageTitle)));
|
||||
QDir::homePath() + "/" + QString("%1.png").arg(qz_filterCharsFromFilename(m_pageTitle)));
|
||||
|
||||
if (!path.isEmpty()) {
|
||||
m_pageImage.save(path);
|
||||
close();
|
||||
|
||||
QTimer::singleShot(0, this, SLOT(close()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ bool PluginProxy::processMouseMove(const Qz::ObjectName &type, QObject* obj, QMo
|
||||
return accepted;
|
||||
}
|
||||
|
||||
bool PluginProxy::processWheelEvent(const Qz::ObjectName &type, QObject *obj, QWheelEvent *event)
|
||||
bool PluginProxy::processWheelEvent(const Qz::ObjectName &type, QObject* obj, QWheelEvent* event)
|
||||
{
|
||||
bool accepted = false;
|
||||
|
||||
|
@ -28,7 +28,8 @@ class QT_QUPZILLA_EXPORT PluginProxy : public Plugins
|
||||
public:
|
||||
enum EventHandlerType { MouseDoubleClickHandler, MousePressHandler, MouseReleaseHandler,
|
||||
MouseMoveHandler, KeyPressHandler, KeyReleaseHandler,
|
||||
WheelEventHandler};
|
||||
WheelEventHandler
|
||||
};
|
||||
|
||||
explicit PluginProxy();
|
||||
|
||||
|
@ -50,12 +50,9 @@ bool Plugins::loadPlugin(Plugins::Plugin* plugin)
|
||||
return false;
|
||||
}
|
||||
|
||||
int index = m_availablePlugins.indexOf(*plugin);
|
||||
if (index == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_availablePlugins[index].instance = initPlugin(iPlugin, plugin->pluginLoader);
|
||||
m_availablePlugins.removeOne(*plugin);
|
||||
plugin->instance = initPlugin(iPlugin, plugin->pluginLoader);
|
||||
m_availablePlugins.append(*plugin);
|
||||
|
||||
refreshLoadedPlugins();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user