forked from qt-creator/qt-creator
QmlProfiler: Get rid of field/column mapping in statistics view
None of the fields are ever unavailable, and they are always shown in the same order, so we can just use the enums directly instead of a mapping and an extra whitelist. This enables us to also drop some magic numbers. In addition, none of the items have children. So we don't need to expand or collapse them. Change-Id: Ibf3d1933d1fb703f5d8e74ae5043c3d1db462738 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -49,25 +49,29 @@ enum ItemRole {
|
||||
ColumnRole
|
||||
};
|
||||
|
||||
enum Fields {
|
||||
Name,
|
||||
Callee,
|
||||
CalleeDescription,
|
||||
Caller,
|
||||
CallerDescription,
|
||||
CallCount,
|
||||
Details,
|
||||
Location,
|
||||
MaxTime,
|
||||
TimePerCall,
|
||||
SelfTime,
|
||||
SelfTimeInPercent,
|
||||
MinTime,
|
||||
TimeInPercent,
|
||||
TotalTime,
|
||||
Type,
|
||||
MedianTime,
|
||||
MaxFields
|
||||
enum MainField {
|
||||
MainLocation,
|
||||
MainType,
|
||||
MainTimeInPercent,
|
||||
MainTotalTime,
|
||||
MainSelfTimeInPercent,
|
||||
MainSelfTime,
|
||||
MainCallCount,
|
||||
MainTimePerCall,
|
||||
MainMedianTime,
|
||||
MainMaxTime,
|
||||
MainMinTime,
|
||||
MainDetails,
|
||||
MaxMainField
|
||||
};
|
||||
|
||||
enum RelativeField {
|
||||
RelativeLocation,
|
||||
RelativeType,
|
||||
RelativeTotalTime,
|
||||
RelativeCallCount,
|
||||
RelativeDetails,
|
||||
MaxRelativeField
|
||||
};
|
||||
|
||||
class QmlProfilerStatisticsView : public QmlProfilerEventsView
|
||||
@@ -107,8 +111,6 @@ public:
|
||||
explicit QmlProfilerStatisticsMainView(QWidget *parent, QmlProfilerStatisticsModel *model);
|
||||
~QmlProfilerStatisticsMainView();
|
||||
|
||||
void setFieldViewable(Fields field, bool show);
|
||||
|
||||
QModelIndex selectedModelIndex() const;
|
||||
void copyTableToClipboard() const;
|
||||
void copyRowToClipboard() const;
|
||||
|
||||
Reference in New Issue
Block a user