summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp
index ffc92a37a0..91881d79d0 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<QSortFilterProxyModel *>(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);
});