diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp index ffc92a37a01..91881d79d08 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp @@ -274,8 +274,14 @@ void QmlProfilerStatisticsMainView::jumpToItem(int typeIndex) { displayTypeIndex(typeIndex); + QSortFilterProxyModel *sortModel = qobject_cast(model()); + QTC_ASSERT(sortModel, return); + + QAbstractItemModel *sourceModel = sortModel->sourceModel(); + QTC_ASSERT(sourceModel, return); + // show in editor - getSourceLocation(model()->index(typeIndex, MainLocation), + getSourceLocation(sourceModel->index(typeIndex, MainLocation), [this](const QString &fileName, int line, int column) { emit gotoSourceLocation(fileName, line, column); });