forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -274,8 +274,14 @@ void QmlProfilerStatisticsMainView::jumpToItem(int typeIndex)
|
|||||||
{
|
{
|
||||||
displayTypeIndex(typeIndex);
|
displayTypeIndex(typeIndex);
|
||||||
|
|
||||||
|
QSortFilterProxyModel *sortModel = qobject_cast<QSortFilterProxyModel *>(model());
|
||||||
|
QTC_ASSERT(sortModel, return);
|
||||||
|
|
||||||
|
QAbstractItemModel *sourceModel = sortModel->sourceModel();
|
||||||
|
QTC_ASSERT(sourceModel, return);
|
||||||
|
|
||||||
// show in editor
|
// show in editor
|
||||||
getSourceLocation(model()->index(typeIndex, MainLocation),
|
getSourceLocation(sourceModel->index(typeIndex, MainLocation),
|
||||||
[this](const QString &fileName, int line, int column) {
|
[this](const QString &fileName, int line, int column) {
|
||||||
emit gotoSourceLocation(fileName, line, column);
|
emit gotoSourceLocation(fileName, line, column);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user