QmlProfiler: Show placeholder labels in select locations

The "<bytecode>" and "Source code not available" labels should not be
added to the model as otherwise they end up in trace files. Instead the
view should show them instead of empty strings where it makes sense.

Change-Id: I37a0c8468ead0194771556d9276c24cb7f05c061
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-07-02 13:57:10 +02:00
parent 7394211603
commit ccf871aa20
4 changed files with 14 additions and 12 deletions

View File

@@ -69,10 +69,7 @@ QString getDisplayName(const QmlProfilerDataModel::QmlEventTypeData &event)
const QmlDebug::QmlEventLocation eventLocation = getLocation(event);
QString displayName;
// generate hash
if (eventLocation.filename.isEmpty()) {
displayName = QmlProfilerDataModel::tr("<bytecode>");
} else {
if (!eventLocation.filename.isEmpty()) {
const QString filePath = QUrl(eventLocation.filename).path();
displayName = filePath.mid(filePath.lastIndexOf(QLatin1Char('/')) + 1) + QLatin1Char(':') +
QString::number(eventLocation.line);