From 0eb1301b5c8f16e627a4ac020296aa00ef27470c Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 13 Sep 2016 15:54:20 +0200 Subject: [PATCH] QmlProfiler: Don't lie about the debug messages model's row count The previous code would crash in the renderer if the type id is smaller than the detail type of the message. That is rare, but can happen. Change-Id: I7702284bc61a7c9227c7ad81ecf714255db5db9f Reviewed-by: Michael Winkelmann Reviewed-by: Kai Koehne --- src/plugins/qmlprofiler/debugmessagesmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/debugmessagesmodel.cpp b/src/plugins/qmlprofiler/debugmessagesmodel.cpp index ef100f19b01..d3df28d601f 100644 --- a/src/plugins/qmlprofiler/debugmessagesmodel.cpp +++ b/src/plugins/qmlprofiler/debugmessagesmodel.cpp @@ -99,7 +99,7 @@ void DebugMessagesModel::loadEvent(const QmlEvent &event, const QmlEventType &ty m_data.insert(insert(event.timestamp(), 0, type.detailType()), MessageData(event.string(), event.typeIndex())); if (type.detailType() > m_maximumMsgType) - m_maximumMsgType = event.typeIndex(); + m_maximumMsgType = type.detailType(); } void DebugMessagesModel::finalize()