aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/debugger')
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp13
-rw-r--r--tests/auto/qml/debugger/shared/qqmlenginedebugclient.cpp6
-rw-r--r--tests/auto/qml/debugger/shared/qqmlenginedebugclient.h2
3 files changed, 20 insertions, 1 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index b544427c08..cebe9cb1ba 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -79,6 +79,7 @@ public:
Complete, // end of transmission
PixmapCacheEvent,
SceneGraphFrame,
+ MemoryAllocation,
MaximumMessage
};
@@ -131,6 +132,12 @@ public:
MaximumSceneGraphFrameType
};
+ enum MemoryType {
+ HeapPage,
+ LargeItem,
+ SmallItem
+ };
+
QQmlProfilerClient(QQmlDebugConnection *connection)
: QQmlDebugClient(QLatin1String("CanvasFrameRate"), connection)
{
@@ -303,6 +310,12 @@ void QQmlProfilerClient::messageReceived(const QByteArray &message)
}
break;
}
+ case QQmlProfilerClient::MemoryAllocation: {
+ stream >> data.detailType;
+ qint64 amount;
+ stream >> amount;
+ return;
+ }
default:
QString failMsg = QString("Unknown message type:") + data.messageType;
QFAIL(qPrintable(failMsg));
diff --git a/tests/auto/qml/debugger/shared/qqmlenginedebugclient.cpp b/tests/auto/qml/debugger/shared/qqmlenginedebugclient.cpp
index 610d80d559..022ba8c440 100644
--- a/tests/auto/qml/debugger/shared/qqmlenginedebugclient.cpp
+++ b/tests/auto/qml/debugger/shared/qqmlenginedebugclient.cpp
@@ -84,7 +84,8 @@ QQmlEngineDebugClient::QQmlEngineDebugClient(
QQmlDebugConnection *connection)
: QQmlDebugClient(QLatin1String("QmlDebugger"), connection),
m_nextId(0),
- m_valid(false)
+ m_valid(false),
+ m_connection(connection)
{
}
@@ -467,6 +468,9 @@ void QQmlEngineDebugClient::messageReceived(const QByteArray &data)
{
m_valid = false;
QDataStream ds(data);
+ ds.setVersion(m_connection->dataStreamVersion());
+
+
int queryId;
QByteArray type;
ds >> type >> queryId;
diff --git a/tests/auto/qml/debugger/shared/qqmlenginedebugclient.h b/tests/auto/qml/debugger/shared/qqmlenginedebugclient.h
index 1d4b95a9e3..2712692389 100644
--- a/tests/auto/qml/debugger/shared/qqmlenginedebugclient.h
+++ b/tests/auto/qml/debugger/shared/qqmlenginedebugclient.h
@@ -242,6 +242,8 @@ private:
QmlDebugObjectReference m_object;
QList<QmlDebugObjectReference> m_objects;
QVariant m_exprResult;
+
+ QQmlDebugConnection *m_connection;
};
#endif // QQMLENGINEDEBUGCLIENT_H