summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-03 20:04:21 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-03 20:04:34 (GMT)
commitcc674647ac886d8ac7bbab43ec2e1d007b75768f (patch)
tree7b441ad021ca81db5f3cb06d8478844e85c8c8e7
parent3beb253925ca46db7d235d58c9be94d9dc0942e1 (diff)
Remove unused variable
-rw-r--r--webengineviewer/src/webenginepage.cpp17
-rw-r--r--webengineviewer/src/webenginepage.h1
2 files changed, 0 insertions, 18 deletions
diff --git a/webengineviewer/src/webenginepage.cpp b/webengineviewer/src/webenginepage.cpp
index ea5f8d2..2222825 100644
--- a/webengineviewer/src/webenginepage.cpp
+++ b/webengineviewer/src/webenginepage.cpp
@@ -86,23 +86,6 @@ void WebEnginePage::saveHtml(QWebEngineDownloadItem *download)
#endif
}
-QVariant WebEnginePage::execJavaScript(const QString &scriptSource, int timeout)
-{
- QVariant result;
- QPointer<QEventLoop> loop = new QEventLoop;
- QTimer::singleShot(timeout, loop.data(), &QEventLoop::quit);
-
- runJavaScript(scriptSource, [loop, &result](const QVariant & res) {
- if (loop && loop->isRunning()) {
- result = res;
- loop->quit();
- }
- });
- loop->exec();
- delete loop;
- return result;
-}
-
bool WebEnginePage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame)
{
if (isMainFrame && type == NavigationTypeLinkClicked) {
diff --git a/webengineviewer/src/webenginepage.h b/webengineviewer/src/webenginepage.h
index 8a3e2db..71ac5ab 100644
--- a/webengineviewer/src/webenginepage.h
+++ b/webengineviewer/src/webenginepage.h
@@ -38,7 +38,6 @@ public:
~WebEnginePage();
WebEngineViewer::WebHitTest *hitTestContent(const QPoint &pos);
- QVariant execJavaScript(const QString &scriptSource, int timeout = 500);
void saveHtml(QWebEngineDownloadItem *download);
Q_SIGNALS: