Commit b060f7a9 authored by Laurent Montel's avatar Laurent Montel 😁

Use script word id

parent 3cfee356
......@@ -18,6 +18,7 @@
*/
#include "webengineaccesskeyanchorfromhtmltest.h"
#include "../webengineaccesskeyutils.h"
#include <WebEngineViewer/WebEngineManageScript>
#include <QTest>
#include <QHBoxLayout>
#include <QWebEngineView>
......@@ -74,7 +75,13 @@ void TestWebEngineAccessKey::handleSearchAccessKey(const QVariant &var)
void TestWebEngineAccessKey::loadFinished(bool b)
{
Q_UNUSED(b);
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
mEngineView->page()->runJavaScript(WebEngineViewer::WebEngineAccessKeyUtils::script(),
WebEngineViewer::WebEngineManageScript::scriptWordId(),
invoke(this, &TestWebEngineAccessKey::handleSearchAccessKey));
#else
mEngineView->page()->runJavaScript(WebEngineViewer::WebEngineAccessKeyUtils::script(), invoke(this, &TestWebEngineAccessKey::handleSearchAccessKey));
#endif
}
Q_DECLARE_METATYPE(QVector<WebEngineViewer::WebEngineAccessKeyAnchor>)
......
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