mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
moved Extensions object from plugins to externaljsobject
This commit is contained in:
parent
77e90262af
commit
13ce88b618
@ -38,7 +38,6 @@ Plugins::Plugins(QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_pluginsLoaded(false)
|
||||
, m_speedDial(new SpeedDial(this))
|
||||
, m_extensions(new Extensions(this))
|
||||
{
|
||||
loadSettings();
|
||||
|
||||
@ -47,8 +46,6 @@ Plugins::Plugins(QObject* parent)
|
||||
}
|
||||
|
||||
loadQmlSupport();
|
||||
|
||||
connect(this, &Plugins::refreshedLoadedPlugins, m_extensions, &Extensions::requestReload);
|
||||
}
|
||||
|
||||
QList<Plugins::Plugin> Plugins::getAvailablePlugins()
|
||||
|
@ -103,9 +103,6 @@ public:
|
||||
// SpeedDial
|
||||
SpeedDial* speedDial() { return m_speedDial; }
|
||||
|
||||
// Extensions
|
||||
Extensions *extensions() { return m_extensions; }
|
||||
|
||||
static PluginSpec createSpec(const DesktopFile &metaData);
|
||||
|
||||
static QStringList getDefaultAllowedPlugins();
|
||||
@ -147,7 +144,6 @@ private:
|
||||
bool m_pluginsLoaded;
|
||||
|
||||
SpeedDial* m_speedDial;
|
||||
Extensions *m_extensions;
|
||||
QList<PluginInterface*> m_internalPlugins;
|
||||
|
||||
QLibrary *m_pythonPlugin = nullptr;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "webpage.h"
|
||||
#include "autofilljsobject.h"
|
||||
#include "restoremanager.h"
|
||||
#include "extensions.h"
|
||||
#include "themes.h"
|
||||
|
||||
#include <QWebChannel>
|
||||
@ -33,8 +34,10 @@ ExternalJsObject::ExternalJsObject(WebPage *page)
|
||||
: QObject(page)
|
||||
, m_page(page)
|
||||
, m_autoFill(new AutoFillJsObject(this))
|
||||
, m_extensions(new Extensions(this))
|
||||
, m_themes(new Themes(this))
|
||||
{
|
||||
connect(mApp->plugins(), &PluginProxy::refreshedLoadedPlugins, m_extensions, &Extensions::requestReload);
|
||||
}
|
||||
|
||||
WebPage *ExternalJsObject::page() const
|
||||
@ -90,7 +93,7 @@ QObject *ExternalJsObject::extensions() const
|
||||
if (m_page->url().toString() != QL1S("falkon:extensions"))
|
||||
return Q_NULLPTR;
|
||||
|
||||
return mApp->plugins()->extensions();
|
||||
return m_extensions;
|
||||
}
|
||||
|
||||
QObject *ExternalJsObject::themes() const
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
class WebPage;
|
||||
class AutoFillJsObject;
|
||||
class Extensions;
|
||||
class Themes;
|
||||
|
||||
class QWebChannel;
|
||||
@ -56,6 +57,7 @@ private:
|
||||
|
||||
WebPage *m_page;
|
||||
AutoFillJsObject *m_autoFill;
|
||||
Extensions *m_extensions;
|
||||
Themes *m_themes;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user