QmlProfiler: get location from details in Creation events

Change-Id: Ia9d03694a9f6b766c3c5ed453b0a6c3a4d4d6ced
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
Christiaan Janssen
2013-07-11 15:05:04 +02:00
parent 832e2b8d39
commit adcb00a4c3

View File

@@ -44,7 +44,8 @@ QString getInitialDetails(const QmlProfilerSimpleModel::QmlEventData &event);
QmlDebug::QmlEventLocation getLocation(const QmlProfilerSimpleModel::QmlEventData &event) QmlDebug::QmlEventLocation getLocation(const QmlProfilerSimpleModel::QmlEventData &event)
{ {
QmlDebug::QmlEventLocation eventLocation = event.location; QmlDebug::QmlEventLocation eventLocation = event.location;
if (event.eventType == QmlDebug::Compiling && eventLocation.filename.isEmpty()) { if ((event.eventType == QmlDebug::Creating || event.eventType == QmlDebug::Compiling)
&& eventLocation.filename.isEmpty()) {
eventLocation.filename = getInitialDetails(event); eventLocation.filename = getInitialDetails(event);
eventLocation.line = 1; eventLocation.line = 1;
eventLocation.column = 1; eventLocation.column = 1;