[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-addons/Applications/16.08] plugins/webengineurlinterceptor/adblock/lib: Use scriptWordId
From: Montel Laurent <montel () kde ! org>
Date: 2016-10-04 4:56:02
Message-ID: E1brHlq-00041y-Mj () code ! kde ! org
[Download RAW message or body]
Git commit 417a2a6fb3e7c2be810e0e92f97dedda255e6018 by Montel Laurent.
Committed on 04/10/2016 at 04:55.
Pushed by mlaurent into branch 'Applications/16.08'.
Use scriptWordId
M +15 -1 plugins/webengineurlinterceptor/adblock/lib/adblockblockableitemsjob.cpp
http://commits.kde.org/kdepim-addons/417a2a6fb3e7c2be810e0e92f97dedda255e6018
diff --git a/plugins/webengineurlinterceptor/adblock/lib/adblockblockableitemsjob.cpp \
b/plugins/webengineurlinterceptor/adblock/lib/adblockblockableitemsjob.cpp index \
e2b73d3..90ba874 100644
--- a/plugins/webengineurlinterceptor/adblock/lib/adblockblockableitemsjob.cpp
+++ b/plugins/webengineurlinterceptor/adblock/lib/adblockblockableitemsjob.cpp
@@ -19,6 +19,7 @@
#include "adblockblockableitemsjob.h"
#include <WebEngineViewer/WebEngineScript>
+#include <WebEngineViewer/WebEngineManageScript>
#include <QWebEngineView>
#include <QPointer>
@@ -63,7 +64,14 @@ void AdBlockBlockableItemsJob::setWebEngineView(QWebEngineView \
*webEngineView) void AdBlockBlockableItemsJob::searchBlockableItems()
{
if (mWebEngineView) {
- mWebEngineView->page()->runJavaScript(WebEngineViewer::WebEngineScript::findAllImages(), \
invoke(this, &AdBlockBlockableItemsJob::handleSearchBlockableImageItems)); +#if \
QT_VERSION >= 0x050700 + \
mWebEngineView->page()->runJavaScript(WebEngineViewer::WebEngineScript::findAllImages(),
+ \
WebEngineViewer::WebEngineManageScript::scriptWordId(), + \
invoke(this, &AdBlockBlockableItemsJob::handleSearchBlockableImageItems)); +#else
+ mWebEngineView->page()->runJavaScript(WebEngineViewer::WebEngineScript::findAllImages(),
+ invoke(this, \
&AdBlockBlockableItemsJob::handleSearchBlockableImageItems)); +#endif
} else {
Q_EMIT searchItemsDone(QVector<AdBlock::AdBlockResult>());
deleteLater();
@@ -91,7 +99,13 @@ void \
AdBlockBlockableItemsJob::handleSearchBlockableImageItems(const QVariant &r }
}
}
+#if QT_VERSION >= 0x050700
+ mWebEngineView->page()->runJavaScript(WebEngineViewer::WebEngineScript::findAllScripts(),
+ \
WebEngineViewer::WebEngineManageScript::scriptWordId(), + \
invoke(this, &AdBlockBlockableItemsJob::handleSearchBlockableScriptsItems)); +#else
mWebEngineView->page()->runJavaScript(WebEngineViewer::WebEngineScript::findAllScripts(), \
invoke(this, &AdBlockBlockableItemsJob::handleSearchBlockableScriptsItems)); +#endif
}
QWebEngineView *AdBlockBlockableItemsJob::webEngineView() const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic