diff --git a/src/plugins/qmlprofiler/inputeventsmodel.cpp b/src/plugins/qmlprofiler/inputeventsmodel.cpp index 21ce9b41c2e..c3cdc2fa52d 100644 --- a/src/plugins/qmlprofiler/inputeventsmodel.cpp +++ b/src/plugins/qmlprofiler/inputeventsmodel.cpp @@ -175,12 +175,6 @@ void InputEventsModel::clear() QmlProfilerTimelineModel::clear(); } -bool InputEventsModel::accepted(const QmlEventType &type) const -{ - return QmlProfilerTimelineModel::accepted(type) && - (type.detailType() == Mouse || type.detailType() == Key); -} - InputEventsModel::InputEvent::InputEvent(InputEventType type, int a, int b) : type(type), a(a), b(b) { diff --git a/src/plugins/qmlprofiler/inputeventsmodel.h b/src/plugins/qmlprofiler/inputeventsmodel.h index d38350777a1..17cd114336a 100644 --- a/src/plugins/qmlprofiler/inputeventsmodel.h +++ b/src/plugins/qmlprofiler/inputeventsmodel.h @@ -44,7 +44,6 @@ public: InputEventsModel(QmlProfilerModelManager *manager, Timeline::TimelineModelAggregator *parent); - bool accepted(const QmlEventType &type) const override; void loadEvent(const QmlEvent &event, const QmlEventType &type) override; void finalize() override; void clear() override; diff --git a/src/plugins/qmlprofiler/memoryusagemodel.cpp b/src/plugins/qmlprofiler/memoryusagemodel.cpp index 9fcaaa4cb38..a9a09185f54 100644 --- a/src/plugins/qmlprofiler/memoryusagemodel.cpp +++ b/src/plugins/qmlprofiler/memoryusagemodel.cpp @@ -141,12 +141,6 @@ QVariantMap MemoryUsageModel::details(int index) const return result; } -bool MemoryUsageModel::accepted(const QmlEventType &type) const -{ - return QmlProfilerTimelineModel::accepted(type) - || (type.rangeType() != MaximumRangeType && type.rangeType() != Compiling); -} - void MemoryUsageModel::loadEvent(const QmlEvent &event, const QmlEventType &type) { if (type.message() != MemoryAllocation) { diff --git a/src/plugins/qmlprofiler/memoryusagemodel.h b/src/plugins/qmlprofiler/memoryusagemodel.h index 65c0d7a528b..d57d0855cb6 100644 --- a/src/plugins/qmlprofiler/memoryusagemodel.h +++ b/src/plugins/qmlprofiler/memoryusagemodel.h @@ -66,7 +66,6 @@ public: QVariantList labels() const override; QVariantMap details(int index) const override; - bool accepted(const QmlEventType &type) const override; void loadEvent(const QmlEvent &event, const QmlEventType &type) override; void finalize() override; void clear() override; diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp index 7e7f46ed43c..d59cbf526d9 100644 --- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp @@ -55,11 +55,6 @@ void QmlProfilerAnimationsModel::clear() QmlProfilerTimelineModel::clear(); } -bool QmlProfilerAnimationsModel::accepted(const QmlEventType &type) const -{ - return QmlProfilerTimelineModel::accepted(type) && type.detailType() == AnimationFrame; -} - void QmlProfilerAnimationsModel::loadEvent(const QmlEvent &event, const QmlEventType &type) { Q_UNUSED(type); diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h index 7364db61e33..44e6acf964b 100644 --- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h +++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h @@ -64,7 +64,6 @@ public: QVariantList labels() const override; QVariantMap details(int index) const override; - bool accepted(const QmlEventType &type) const override; void loadEvent(const QmlEvent &event, const QmlEventType &type) override; void finalize() override; void clear() override; diff --git a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp index 938f979f398..82b6ba563b8 100644 --- a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.cpp @@ -65,17 +65,12 @@ ProfileFeature QmlProfilerTimelineModel::mainFeature() const return m_mainFeature; } -bool QmlProfilerTimelineModel::accepted(const QmlEventType &type) const -{ - return (type.rangeType() == m_rangeType && type.message() == m_message); -} - bool QmlProfilerTimelineModel::handlesTypeId(int typeIndex) const { if (typeIndex < 0) return false; - return accepted(modelManager()->eventType(typeIndex)); + return modelManager()->eventType(typeIndex).feature() == m_mainFeature; } QmlProfilerModelManager *QmlProfilerTimelineModel::modelManager() const diff --git a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h index 94583f7e07d..d7326334d50 100644 --- a/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h +++ b/src/plugins/qmlprofiler/qmlprofilertimelinemodel.h @@ -50,7 +50,6 @@ public: Message message() const; ProfileFeature mainFeature() const; - virtual bool accepted(const QmlEventType &type) const; bool handlesTypeId(int typeId) const override; QVariantMap locationFromTypeId(int index) const; diff --git a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp index 7a111913edd..141708f0639 100644 --- a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.cpp @@ -63,15 +63,6 @@ void InputEventsModelTest::initTestCase() manager.finalize(); } -void InputEventsModelTest::testAccepted() -{ - QVERIFY(!model.accepted(QmlEventType())); - QVERIFY(!model.accepted(QmlEventType(Event))); - QVERIFY(!model.accepted(QmlEventType(Event, MaximumRangeType))); - QVERIFY(model.accepted(QmlEventType(Event, MaximumRangeType, Key))); - QVERIFY(model.accepted(QmlEventType(Event, MaximumRangeType, Mouse))); -} - void InputEventsModelTest::testTypeId() { for (int i = 0; i < 10; ++i) { diff --git a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h index 16c92d83bb4..f8966eb0f2a 100644 --- a/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h +++ b/src/plugins/qmlprofiler/tests/inputeventsmodel_test.h @@ -40,7 +40,6 @@ public: private slots: void initTestCase(); - void testAccepted(); void testTypeId(); void testColor(); void testLabels(); diff --git a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp index 694bc58bed9..faa0dd1e897 100644 --- a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.cpp @@ -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(); diff --git a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h index 2bd40aa6a4a..5c779b729fd 100644 --- a/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h +++ b/src/plugins/qmlprofiler/tests/memoryusagemodel_test.h @@ -49,7 +49,6 @@ private slots: void testCollapsedRow(); void testLocation(); void testRelativeHeight(); - void testAccepted(); void cleanupTestCase(); private: diff --git a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp index f299c8e6d96..1f16ddb6d5d 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.cpp @@ -56,14 +56,6 @@ void QmlProfilerAnimationsModelTest::initTestCase() manager.finalize(); } -void QmlProfilerAnimationsModelTest::testAccepted() -{ - QVERIFY(!model.accepted(QmlEventType())); - QVERIFY(!model.accepted(QmlEventType(Event))); - QVERIFY(!model.accepted(QmlEventType(Event, MaximumRangeType))); - QVERIFY(model.accepted(QmlEventType(Event, MaximumRangeType, AnimationFrame))); -} - void QmlProfilerAnimationsModelTest::testRowMaxValue() { QCOMPARE(model.rowMaxValue(0), 0); diff --git a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h index 4ce91a93ac9..c6b8927d742 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h +++ b/src/plugins/qmlprofiler/tests/qmlprofileranimationsmodel_test.h @@ -40,7 +40,6 @@ public: private slots: void initTestCase(); - void testAccepted(); void testRowMaxValue(); void testRowNumbers(); void testTypeId();