1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

PluginProxy: Set MainApplication as parent

This commit is contained in:
David Rosca 2018-02-07 11:20:42 +01:00
parent f7e64e2353
commit fd759ded62
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 7 additions and 6 deletions

View File

@ -308,7 +308,7 @@ MainApplication::MainApplication(int &argc, char** argv)
translateApp();
loadSettings();
m_plugins = new PluginProxy;
m_plugins = new PluginProxy(this);
m_autoFill = new AutoFill(this);
if (!noAddons)
@ -355,8 +355,9 @@ MainApplication::~MainApplication()
// Delete all classes that are saving data in destructor
delete m_bookmarks;
m_bookmarks = nullptr;
delete m_cookieJar;
delete m_plugins;
m_cookieJar = nullptr;
Settings::syncSettings();
}

View File

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -22,8 +22,8 @@
#include <QMenu>
PluginProxy::PluginProxy()
: Plugins()
PluginProxy::PluginProxy(QObject *parent)
: Plugins(parent)
{
connect(this, SIGNAL(pluginUnloaded(PluginInterface*)), this, SLOT(pluginUnloaded(PluginInterface*)));
}

View File

@ -35,7 +35,7 @@ public:
WheelEventHandler
};
explicit PluginProxy();
explicit PluginProxy(QObject *parent = nullptr);
void registerAppEventHandler(const EventHandlerType &type, PluginInterface* obj);