From fce766022b5a66bbfa0ae0bc2755fe018a4e917d Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@qt.io>
Date: Mon, 10 Apr 2017 15:41:46 +0200
Subject: [PATCH] Allow setter methods of WebEngineScript to be called directly

The methods got removed from the script API in change
bec2be57891f87f2b8bc04. However, this might break existing code.

Change-Id: Ibc1b4632ade847953f848b3d1a29a14cab3f035b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 src/webengine/api/qquickwebenginescript.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/webengine/api/qquickwebenginescript.h b/src/webengine/api/qquickwebenginescript.h
index 0b28d4c55..d5c4310db 100644
--- a/src/webengine/api/qquickwebenginescript.h
+++ b/src/webengine/api/qquickwebenginescript.h
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
 ** Contact: https://www.qt.io/licensing/
 **
 ** This file is part of the QtWebEngine module of the Qt Toolkit.
@@ -85,12 +85,12 @@ public:
     ScriptWorldId worldId() const;
     bool runOnSubframes() const;
 
-    void setName(const QString &name);
-    void setSourceUrl(const QUrl &url);
-    void setSourceCode(const QString &code);
-    void setInjectionPoint(InjectionPoint injectionPoint);
-    void setWorldId(ScriptWorldId scriptWorldId);
-    void setRunOnSubframes(bool on);
+    Q_INVOKABLE void setName(const QString &name);
+    Q_INVOKABLE void setSourceUrl(const QUrl &url);
+    Q_INVOKABLE void setSourceCode(const QString &code);
+    Q_INVOKABLE void setInjectionPoint(InjectionPoint injectionPoint);
+    Q_INVOKABLE void setWorldId(ScriptWorldId scriptWorldId);
+    Q_INVOKABLE void setRunOnSubframes(bool on);
 
 Q_SIGNALS:
     void nameChanged(const QString &name);
-- 
GitLab