Add generic FlameGraphView QML component

This allows us to reduce code duplication, but we first have to put
timeline and flame graph into the same library, so that we can use the
TimelineThere in FlameGraphView.

Change-Id: I72b27ffb1fc5aa6baf6a23d85e5ca6c610896b8c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-02 18:51:57 +02:00
parent bd91d938c4
commit 22e523e504
7 changed files with 404 additions and 314 deletions

View File

@@ -158,8 +158,6 @@ void FlameGraphModelTest::testData()
QCOMPARE(model.data(index2, FlameGraphModel::NoteRole).toString(), QString());
QCOMPARE(model.data(index, FlameGraphModel::TimePerCallRole).toLongLong(), 20);
QCOMPARE(model.data(index2, FlameGraphModel::TimePerCallRole).toLongLong(), 12);
QCOMPARE(model.data(index, FlameGraphModel::TimeInPercentRole).toInt(), 62);
QCOMPARE(model.data(index2, FlameGraphModel::TimeInPercentRole).toInt(), 37);
QCOMPARE(model.data(index, FlameGraphModel::RangeTypeRole).toInt(),
static_cast<int>(Javascript));
QCOMPARE(model.data(index2, FlameGraphModel::RangeTypeRole).toInt(),
@@ -201,7 +199,6 @@ void FlameGraphModelTest::testRoleNames()
QCOMPARE(names[FlameGraphModel::ColumnRole], QByteArray("column"));
QCOMPARE(names[FlameGraphModel::NoteRole], QByteArray("note"));
QCOMPARE(names[FlameGraphModel::TimePerCallRole], QByteArray("timePerCall"));
QCOMPARE(names[FlameGraphModel::TimeInPercentRole], QByteArray("timeInPercent"));
QCOMPARE(names[FlameGraphModel::RangeTypeRole], QByteArray("rangeType"));
}