mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +01:00
[OpenSearch] Added support for external.AddSearchProvider js function
This commit is contained in:
parent
cb99a3154e
commit
ffa1e0561f
|
@ -19,6 +19,7 @@
|
||||||
#include "mainapplication.h"
|
#include "mainapplication.h"
|
||||||
#include "pluginproxy.h"
|
#include "pluginproxy.h"
|
||||||
#include "speeddial.h"
|
#include "speeddial.h"
|
||||||
|
#include "searchenginesmanager.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
@ -28,6 +29,17 @@ ExternalJsObject::ExternalJsObject(QObject* parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ExternalJsObject::AddSearchProvider(const QString &engineUrl)
|
||||||
|
{
|
||||||
|
mApp->searchEnginesManager()->addEngine(QUrl(engineUrl));
|
||||||
|
}
|
||||||
|
|
||||||
|
int ExternalJsObject::IsSearchProviderInstalled(const QString &engineURL)
|
||||||
|
{
|
||||||
|
qDebug() << "NOT IMPLEMENTED: IsSearchProviderInstalled()" << engineURL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
QObject* ExternalJsObject::speedDial()
|
QObject* ExternalJsObject::speedDial()
|
||||||
{
|
{
|
||||||
return m_onSpeedDial ? mApp->plugins()->speedDial() : 0;
|
return m_onSpeedDial ? mApp->plugins()->speedDial() : 0;
|
||||||
|
|
|
@ -29,6 +29,9 @@ public:
|
||||||
explicit ExternalJsObject(QObject* parent = 0);
|
explicit ExternalJsObject(QObject* parent = 0);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
void AddSearchProvider(const QString &engineUrl);
|
||||||
|
int IsSearchProviderInstalled(const QString &engineURL);
|
||||||
|
|
||||||
QObject* speedDial();
|
QObject* speedDial();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user