forked from qt-creator/qt-creator
QmlProfiler: Provide a sane ctor for QmlEventType and use it
... in turn, make its members private, so that we don't accidentally change them. Change-Id: Ibc65b406ee341d33f69647ed1b19e1e34f5cd535 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -168,14 +168,14 @@ QVariant FlameGraphModel::lookup(const FlameGraphData &stats, int role) const
|
||||
const QmlEventType &type = typeList[stats.typeIndex];
|
||||
|
||||
switch (role) {
|
||||
case FilenameRole: return type.location.filename();
|
||||
case LineRole: return type.location.line();
|
||||
case ColumnRole: return type.location.column();
|
||||
case TypeRole: return nameForType(type.rangeType);
|
||||
case RangeTypeRole: return type.rangeType;
|
||||
case DetailsRole: return type.data.isEmpty() ?
|
||||
FlameGraphModel::tr("Source code not available") : type.data;
|
||||
case LocationRole: return type.displayName;
|
||||
case FilenameRole: return type.location().filename();
|
||||
case LineRole: return type.location().line();
|
||||
case ColumnRole: return type.location().column();
|
||||
case TypeRole: return nameForType(type.rangeType());
|
||||
case RangeTypeRole: return type.rangeType();
|
||||
case DetailsRole: return type.data().isEmpty() ?
|
||||
FlameGraphModel::tr("Source code not available") : type.data();
|
||||
case LocationRole: return type.displayName();
|
||||
default: return QVariant();
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user