forked from qt-creator/qt-creator
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 <Michael.winkelmann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user