1
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:
nowrep 2012-03-07 20:01:57 +01:00
parent 2e3cc19ac5
commit 5c2befabff
6 changed files with 12 additions and 13 deletions

View File

@ -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();
}

View File

@ -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

View File

@ -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()));
}
}

View File

@ -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;

View File

@ -28,7 +28,8 @@ class QT_QUPZILLA_EXPORT PluginProxy : public Plugins
public:
enum EventHandlerType { MouseDoubleClickHandler, MousePressHandler, MouseReleaseHandler,
MouseMoveHandler, KeyPressHandler, KeyReleaseHandler,
WheelEventHandler};
WheelEventHandler
};
explicit PluginProxy();

View File

@ -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();