diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-12-12 14:35:13 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-01-08 12:06:40 +0000 |
commit | 66f8b97f5ea4a8d196f908fae78d2b68cfab32cf (patch) | |
tree | dc7ac2770c2b2bfb09e6470a929634c3b23c5b67 /tests | |
parent | 76da60b5ad388b6873f496b07b2c3ccabe9c9490 (diff) |
QQmlEngineDebugService: Actually call value types' toString() method
QML value types generally are Q_GADGETs, but the userType we see there
is the wrapped class's type, which doesn't have to be a gadget. So, the
toString() method was rarely called, and a model index would still crash
the debug service.
Change-Id: I63778953eb9d2fc60113c11057da3047fc75a9bd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp index 57e95f7b89..6d31ff9219 100644 --- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp @@ -896,7 +896,8 @@ void tst_QQmlEngineDebugService::queryObjectWithNonStreamableTypes() QmlDebugObjectReference obj = m_dbg->object(); QVERIFY(!obj.className.isEmpty()); - QCOMPARE(findProperty(obj.properties, "modelIndex").value, QVariant()); + QCOMPARE(findProperty(obj.properties, "modelIndex").value, + QVariant(QLatin1String("QModelIndex()"))); } |