Commit 1ec04f3f authored by Laurent Montel's avatar Laurent Montel 😁

Add code to search blockable items

parent 9752b59d
......@@ -24,6 +24,7 @@
#include <KConfigGroup>
#include <KSharedConfig>
#include <QHeaderView>
#include <QWebEngineView>
template<typename Arg, typename R, typename C>
struct InvokeWrapper {
......@@ -94,7 +95,15 @@ void AdBlockBlockableItemsWidget::setWebEngineView(QWebEngineView *view)
mWebEngineView = view;
}
void AdBlockBlockableItemsWidget::searchBlockableItems()
void AdBlockBlockableItemsWidget::handleSearchBlockableItems(const QVariant &var)
{
//TODO
}
void AdBlockBlockableItemsWidget::searchBlockableItems()
{
if (mWebEngineView) {
//TODO fix me
mWebEngineView->page()->runJavaScript(QString(), invoke(this, &AdBlockBlockableItemsWidget::handleSearchBlockableItems));
}
}
......@@ -32,6 +32,10 @@ public:
~AdBlockBlockableItemsWidget();
void setWebEngineView(QWebEngineView *view);
private Q_SLOTS:
void handleSearchBlockableItems(const QVariant &var);
private:
void writeConfig();
void searchBlockableItems();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment