summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-05-30 12:49:47 +0200
committerUlf Hermann <ulf.hermann@qt.io>2018-05-31 07:50:48 +0000
commitaee9cde1602d8360685b0ea60bd69cce24f7e18a (patch)
tree4038cd8e5b44769d83d2908e1998563697dfe60a
parent4b0a4c16600313afe209f1678579c2623b9f5fe3 (diff)
downloadqt-creator-aee9cde1602d8360685b0ea60bd69cce24f7e18a.tar.gz
QmlProfiler: In statistics view use source model for location lookup
The sorted model's rows are not equivalent to typeIDs. Change-Id: I88868e192079f61bd1d336dac98142fd415d9a4a Task-number: QTCREATORBUG-20501 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-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);
});