diff options
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qml/ecmascripttests/TestExpectations | 35 | ||||
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp | 2 |
7 files changed, 8 insertions, 43 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 2aca7c2849..5d2577d81c 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -344,7 +344,7 @@ ReturnedValue FunctionPrototype::method_toString(const FunctionObject *b, const if (!functionName.isEmpty()) functionAsString.append(QLatin1Char(' ') + functionName); - functionAsString.append(QStringLiteral("() { [code] }")); + functionAsString.append(QStringLiteral("() { [native code] }")); return Encode(v4->newString(functionAsString)); } diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index cf87d58e68..e38f379eb0 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -552,7 +552,7 @@ void QQmlBinding::setEnabled(bool e, QQmlPropertyData::WriteFlags flags) QString QQmlBinding::expression() const { - return QStringLiteral("function() { [code] }"); + return QStringLiteral("function() { [native code] }"); } void QQmlBinding::setTarget(const QQmlProperty &prop) diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp index 3d67b45fe8..82c7921e0c 100644 --- a/src/qml/qml/qqmlboundsignal.cpp +++ b/src/qml/qml/qqmlboundsignal.cpp @@ -168,7 +168,7 @@ void QQmlBoundSignalExpression::expressionChanged() QString QQmlBoundSignalExpression::expression() const { if (expressionFunctionValid()) - return QStringLiteral("function() { [code] }"); + return QStringLiteral("function() { [native code] }"); return QString(); } diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp index 417b75e760..c613d88b2b 100644 --- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp @@ -1124,7 +1124,7 @@ void tst_QQmlEngineDebugService::setBindingForObject() QCOMPARE(onEnteredRef.name, QString("onEntered")); // Sorry, can't do that anymore: QCOMPARE(onEnteredRef.value, QVariant("{ console.log('hello') }")); - QCOMPARE(onEnteredRef.value, QVariant("function() { [code] }")); + QCOMPARE(onEnteredRef.value, QVariant("function() { [native code] }")); m_dbg->setBindingForObject(mouseAreaObject.debugId, "onEntered", "{console.log('hello, world') }", false, @@ -1144,7 +1144,7 @@ void tst_QQmlEngineDebugService::setBindingForObject() QVERIFY(!mouseAreaObject.className.isEmpty()); onEnteredRef = findProperty(mouseAreaObject.properties, "onEntered"); QCOMPARE(onEnteredRef.name, QString("onEntered")); - QCOMPARE(onEnteredRef.value, QVariant("function() { [code] }")); + QCOMPARE(onEnteredRef.value, QVariant("function() { [native code] }")); } void tst_QQmlEngineDebugService::resetBindingForObject() diff --git a/tests/auto/qml/ecmascripttests/TestExpectations b/tests/auto/qml/ecmascripttests/TestExpectations index 2ea3678766..2cb4ea166d 100644 --- a/tests/auto/qml/ecmascripttests/TestExpectations +++ b/tests/auto/qml/ecmascripttests/TestExpectations @@ -398,10 +398,6 @@ built-ins/Function/prototype/bind/instance-name-non-string.js fails built-ins/Function/prototype/bind/instance-name.js fails built-ins/Function/prototype/bind/proto-from-ctor-realm.js fails built-ins/Function/prototype/toString/AsyncFunction.js fails -built-ins/Function/prototype/toString/Function.js fails -built-ins/Function/prototype/toString/GeneratorFunction.js fails -built-ins/Function/prototype/toString/anonymous-intrinsics.js fails -built-ins/Function/prototype/toString/arrow-function.js fails built-ins/Function/prototype/toString/async-arrow-function.js fails built-ins/Function/prototype/toString/async-function-declaration.js fails built-ins/Function/prototype/toString/async-function-expression.js fails @@ -410,41 +406,10 @@ built-ins/Function/prototype/toString/async-method-class-expression.js fails built-ins/Function/prototype/toString/async-method-class-statement-static.js fails built-ins/Function/prototype/toString/async-method-class-statement.js fails built-ins/Function/prototype/toString/async-method-object.js fails -built-ins/Function/prototype/toString/bound-function.js fails -built-ins/Function/prototype/toString/class-declaration-complex-heritage.js fails -built-ins/Function/prototype/toString/class-declaration-explicit-ctor.js fails -built-ins/Function/prototype/toString/class-declaration-implicit-ctor.js fails -built-ins/Function/prototype/toString/class-expression-explicit-ctor.js fails -built-ins/Function/prototype/toString/class-expression-implicit-ctor.js fails -built-ins/Function/prototype/toString/function-declaration-non-simple-parameter-list.js fails -built-ins/Function/prototype/toString/function-declaration.js fails -built-ins/Function/prototype/toString/function-expression.js fails -built-ins/Function/prototype/toString/generator-function-declaration.js fails -built-ins/Function/prototype/toString/generator-function-expression.js fails -built-ins/Function/prototype/toString/generator-method.js fails -built-ins/Function/prototype/toString/getter-class-expression-static.js fails -built-ins/Function/prototype/toString/getter-class-expression.js fails -built-ins/Function/prototype/toString/getter-class-statement-static.js fails -built-ins/Function/prototype/toString/getter-class-statement.js fails -built-ins/Function/prototype/toString/getter-object.js fails built-ins/Function/prototype/toString/intrinsics.js fails -built-ins/Function/prototype/toString/line-terminator-normalisation-CR-LF.js fails -built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js fails -built-ins/Function/prototype/toString/line-terminator-normalisation-LF.js fails -built-ins/Function/prototype/toString/method-class-expression-static.js fails -built-ins/Function/prototype/toString/method-class-expression.js fails -built-ins/Function/prototype/toString/method-class-statement-static.js fails -built-ins/Function/prototype/toString/method-class-statement.js fails built-ins/Function/prototype/toString/method-computed-property-name.js fails -built-ins/Function/prototype/toString/method-object.js fails built-ins/Function/prototype/toString/proxy.js fails -built-ins/Function/prototype/toString/setter-class-expression-static.js fails -built-ins/Function/prototype/toString/setter-class-expression.js fails -built-ins/Function/prototype/toString/setter-class-statement-static.js fails -built-ins/Function/prototype/toString/setter-class-statement.js fails -built-ins/Function/prototype/toString/setter-object.js fails built-ins/Function/prototype/toString/symbol-named-builtins.js fails -built-ins/Function/prototype/toString/unicode.js fails built-ins/GeneratorFunction/proto-from-ctor-realm.js fails built-ins/JSON/parse/revived-proxy-revoked.js fails built-ins/JSON/parse/revived-proxy.js fails diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 935fd53a42..04a93fe436 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -4253,9 +4253,9 @@ void tst_QJSEngine::functionToString_data() QTest::addColumn<QString>("expectedString"); QTest::newRow("named function") << QString::fromLatin1("function f() {}; f.toString()") - << QString::fromLatin1("function f() { [code] }"); + << QString::fromLatin1("function f() { [native code] }"); QTest::newRow("anonymous function") << QString::fromLatin1("(function() {}).toString()") - << QString::fromLatin1("function() { [code] }"); + << QString::fromLatin1("function() { [native code] }"); } // Tests that function.toString() prints the function's name. diff --git a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index 77805bbbac..817ca0a257 100644 --- a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -75,7 +75,7 @@ void tst_qqmlconsole::logging() QTest::ignoreMessage(QtDebugMsg, "{\"a\":\"hello\",\"d\":1}"); QTest::ignoreMessage(QtDebugMsg, "undefined"); QTest::ignoreMessage(QtDebugMsg, "12"); - QTest::ignoreMessage(QtDebugMsg, "function e() { [code] }"); + QTest::ignoreMessage(QtDebugMsg, "function e() { [native code] }"); QTest::ignoreMessage(QtDebugMsg, "true"); // Printing QML object prints out the class/type of QML object with the memory address // QTest::ignoreMessage(QtDebugMsg, "QtObject_QML_0(0xABCD..)"); |