diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-12-02 13:08:57 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-04 13:28:28 +0000 |
commit | 37c290c5b8659256ff574a06a3df2c363ae446b5 (patch) | |
tree | c4c627393817a9c7d55c649fa3f730f16feb6cce /tests | |
parent | 3c075bfd348306cd553caddb9f8bf3f596666636 (diff) |
qv4qmlcontext: Fix bounded signal expressions when debugging
Fixes: QTBUG-83599
Change-Id: I8909f0b2d3eca909512b99c172c8dc5e93e48482
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit bad85119bf35468292cfd80ecc934b66515f0c68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp index 84f5eebd10..e3cbeb9891 100644 --- a/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp +++ b/tests/auto/qml/debugger/qv4debugger/tst_qv4debugger.cpp @@ -910,19 +910,25 @@ void tst_qv4debugger::signalParameters() component.setData("import QtQml 2.12\n" "QtObject {\n" " id: root\n" - " property string result\n" + " property string result: 'unset'\n" + " property string resultCallbackInternal: 'unset'\n" + " property string resultCallbackExternal: 'unset'\n" " signal signalWithArg(string textArg)\n" + " function call(callback) { callback(); }\n" + " function externalCallback() { root.resultCallbackExternal = textArg; }\n" " property Connections connections : Connections {\n" " target: root\n" - " onSignalWithArg: { root.result = textArg; }\n" + " onSignalWithArg: { root.result = textArg; call(function() { root.resultCallbackInternal = textArg; }); call(externalCallback); }\n" " }\n" " Component.onCompleted: signalWithArg('something')\n" "}", QUrl("test.qml")); - QVERIFY(component.isReady()); + QVERIFY2(component.isReady(), qPrintable(component.errorString())); QScopedPointer<QObject> obj(component.create()); QVERIFY(obj); QCOMPARE(obj->property("result").toString(), QLatin1String("something")); + QCOMPARE(obj->property("resultCallbackInternal").toString(), QLatin1String("something")); + QCOMPARE(obj->property("resultCallbackExternal").toString(), QLatin1String("unset")); } QTEST_MAIN(tst_qv4debugger) |