Commit 09b1fe3f authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Drop some unreachable code

The model manager will make sure that the flame graph model doesn't get
any events it doesn't accept.

Change-Id: Ibe6e06c558d138cebe6be5dbc76e8f51e9e1fd95
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 4436a1c7
......@@ -51,7 +51,6 @@ FlameGraphModel::FlameGraphModel(QmlProfilerModelManager *modelManager,
this, [this](int typeId, int, int){loadNotes(typeId, true);});
m_modelId = modelManager->registerModelProxy();
m_acceptedTypes << Compiling << Creating << Binding << HandlingSignal << Javascript;
modelManager->announceFeatures(Constants::QML_JS_RANGE_FEATURES,
[this](const QmlEvent &event, const QmlEventType &type) {
loadEvent(event, type);
......@@ -95,8 +94,7 @@ void FlameGraphModel::loadNotes(int typeIndex, bool emitSignal)
void FlameGraphModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
{
if (!m_acceptedTypes.contains(type.rangeType))
return;
Q_UNUSED(type);
if (m_stackBottom.children.isEmpty())
beginResetModel();
......@@ -132,13 +130,12 @@ void FlameGraphModel::onModelManagerStateChanged()
static QString nameForType(RangeType typeNumber)
{
switch (typeNumber) {
case Painting: return FlameGraphModel::tr("Paint");
case Compiling: return FlameGraphModel::tr("Compile");
case Creating: return FlameGraphModel::tr("Create");
case Binding: return FlameGraphModel::tr("Binding");
case HandlingSignal: return FlameGraphModel::tr("Signal");
case Javascript: return FlameGraphModel::tr("JavaScript");
default: return QString();
default: Q_UNREACHABLE();
}
}
......
......@@ -108,7 +108,6 @@ private:
int m_modelId;
QmlProfilerModelManager *m_modelManager;
QList<RangeType> m_acceptedTypes;
QSet<int> m_typeIdsWithNotes;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment