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 <>
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;
[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))
if (m_stackBottom.children.isEmpty())
......@@ -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