summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2017-09-27 23:18:52 +0200
committerPaul Wicking <paul.wicking@qt.io>2018-08-02 09:41:39 +0000
commitb067e607f1cfd5bee94710d6a6a7c2fa048e9b23 (patch)
tree5d358e9009495a55dae13ea86c147edfe0166224
parent8763b916cd8c65f3519814b00b9a2202c74801ad (diff)
Doc: fix QJSEngine code snippet
The code snippet showing how to use QJSValue::call was wrong. This patch corrects that. Change-Id: Ib4c6479f3ef63f4f95af845d0af228d3c71f0731 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> (cherry picked from commit ec2388860141dcde6387f4cba482955de648e5aa) Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/qml/doc/snippets/code/src_script_qjsengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/doc/snippets/code/src_script_qjsengine.cpp b/src/qml/doc/snippets/code/src_script_qjsengine.cpp
index 0310ae042c..6c58fd8a18 100644
--- a/src/qml/doc/snippets/code/src_script_qjsengine.cpp
+++ b/src/qml/doc/snippets/code/src_script_qjsengine.cpp
@@ -58,7 +58,7 @@ QJSValue three = myEngine.evaluate("1 + 2");
QJSValue fun = myEngine.evaluate("(function(a, b) { return a + b; })");
QJSValueList args;
args << 1 << 2;
-QJSValue threeAgain = fun.call(QJSValue(), args);
+QJSValue threeAgain = fun.call(args);
//! [1]