aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-12-09 15:09:20 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2014-12-09 15:09:26 +0100
commitff466a1881435f927f5df9ce1e5eac07d5591904 (patch)
tree760e068743e6a8e1cc4ec63bb2f8e7dcef88b3e2 /tests/auto/qml/debugger
parente04822f3c2a6b69b7d75e2039256aa2433c59dd2 (diff)
parent4a3f6e58b591f2fe2204f7cbc1efc8abb0aade74 (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
Diffstat (limited to 'tests/auto/qml/debugger')
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp2
-rw-r--r--tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp40
2 files changed, 39 insertions, 3 deletions
diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
index c4c2705e01..e4c14a2e10 100644
--- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
@@ -54,7 +54,6 @@ class tst_QQmlEngineDebugInspectorIntegration : public QQmlDataTest
public:
tst_QQmlEngineDebugInspectorIntegration()
: m_process(0)
- , m_connection(0)
, m_inspectorClient(0)
, m_engineDebugClient(0)
{
@@ -65,7 +64,6 @@ private:
QmlDebugObjectReference findRootObject();
QQmlDebugProcess *m_process;
- QQmlDebugConnection *m_connection;
QQmlInspectorClient *m_inspectorClient;
QQmlEngineDebugClient *m_engineDebugClient;
diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
index 5bbbe8e1e9..7c931928d4 100644
--- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp
@@ -36,6 +36,7 @@
#include <QHostAddress>
#include <QDebug>
#include <QThread>
+#include <QModelIndex>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcontext.h>
@@ -73,6 +74,16 @@ signals:
};
QML_DECLARE_TYPE(NonScriptProperty)
+class CustomTypes : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QModelIndex modelIndex READ modelIndex)
+public:
+ CustomTypes(QObject *parent = 0) : QObject(parent) {}
+
+ QModelIndex modelIndex() { return QModelIndex(); }
+};
+
class tst_QQmlEngineDebugService : public QObject
{
Q_OBJECT
@@ -125,6 +136,7 @@ private slots:
void setBindingInStates();
void regression_QTCREATORBUG_7451();
+ void queryObjectWithNonStreamableTypes();
};
QmlDebugObjectReference tst_QQmlEngineDebugService::findRootObject(
@@ -314,6 +326,12 @@ void tst_QQmlEngineDebugService::initTestCase()
"}\n"
;
+ // test non-streamable properties
+ qmlRegisterType<CustomTypes>("Backend", 1, 0, "CustomTypes");
+ qml << "import Backend 1.0\n"
+ "CustomTypes {}"
+ ;
+
for (int i=0; i<qml.count(); i++) {
QQmlComponent component(m_engine);
component.setData(qml[i], QUrl::fromLocalFile(""));
@@ -620,7 +638,7 @@ void tst_QQmlEngineDebugService::queryRootContexts()
// root context query sends only root object data - it doesn't fill in
// the children or property info
QCOMPARE(context.objects.count(), 0);
- QCOMPARE(context.contexts.count(), 5);
+ QCOMPARE(context.contexts.count(), 6);
QVERIFY(context.contexts[0].debugId >= 0);
QCOMPARE(context.contexts[0].name, QString("tst_QQmlDebug_childContext"));
}
@@ -819,6 +837,26 @@ void tst_QQmlEngineDebugService::regression_QTCREATORBUG_7451()
}
}
+void tst_QQmlEngineDebugService::queryObjectWithNonStreamableTypes()
+{
+ bool success;
+
+ QmlDebugObjectReference rootObject = findRootObject(4, true);
+
+ QQmlEngineDebugClient *unconnected = new QQmlEngineDebugClient(0);
+ unconnected->queryObject(rootObject, &success);
+ QVERIFY(!success);
+ delete unconnected;
+
+ m_dbg->queryObject(rootObject, &success);
+ QVERIFY(success);
+ QVERIFY(QQmlDebugTest::waitForSignal(m_dbg, SIGNAL(result())));
+
+ QmlDebugObjectReference obj = m_dbg->object();
+
+ QCOMPARE(findProperty(obj.properties, "modelIndex").value, QVariant());
+}
+
void tst_QQmlEngineDebugService::queryExpressionResult()
{