QmlProfiler: Remove accepted() methods

The only place where we used them was handlesTypeId(), and there it was
wrong. Each QmlProfilerTimelineModel has exactly one main feature it
subscribes to. It might additionally accept events of some auxiliary
features for context, but it doesn't really "handle" the respective
types in the sense that you could, for example, attach notes to them.
Therefore, just checking for the main feature is the right thing to do.

Change-Id: If0c00444084b957f3b99d3456cdbf703ae4afc3d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2018-05-11 17:12:17 +02:00
parent 3ce528d6af
commit 9685711cb3
14 changed files with 1 additions and 55 deletions

View File

@@ -228,14 +228,6 @@ void MemoryUsageModelTest::testRelativeHeight()
QCOMPARE(model.relativeHeight(i), heights[i]);
}
void MemoryUsageModelTest::testAccepted()
{
QVERIFY(!model.accepted(QmlEventType()));
QVERIFY(!model.accepted(QmlEventType(MaximumMessage, MaximumRangeType, HeapPage)));
QVERIFY(model.accepted(QmlEventType(MemoryAllocation, MaximumRangeType, HeapPage)));
QVERIFY(model.accepted(QmlEventType(MaximumMessage, Javascript)));
}
void MemoryUsageModelTest::cleanupTestCase()
{
manager.clearAll();