Merge remote-tracking branch 'origin/4.9'

Change-Id: I95c56cc9371959f96afde3677fc82481f36f66c8
This commit is contained in:
Eike Ziller
2019-04-12 14:31:01 +02:00
33 changed files with 165 additions and 125 deletions

View File

@@ -298,13 +298,15 @@ void QmlProfilerStatisticsMainView::displayTypeIndex(int typeIndex)
QAbstractItemModel *sourceModel = sortModel->sourceModel();
QTC_ASSERT(sourceModel, return);
QModelIndex sourceIndex = sourceModel->index(qMin(typeIndex, sourceModel->rowCount() - 1),
MainCallCount);
QTC_ASSERT(sourceIndex.data(TypeIdRole).toInt() == typeIndex, return);
setCurrentIndex(sourceIndex.data(SortRole).toInt() > 0
? sortModel->mapFromSource(sourceIndex)
: QModelIndex());
if (typeIndex < sourceModel->rowCount()) {
QModelIndex sourceIndex = sourceModel->index(typeIndex, MainCallCount);
QTC_ASSERT(sourceIndex.data(TypeIdRole).toInt() == typeIndex, return);
setCurrentIndex(sourceIndex.data(SortRole).toInt() > 0
? sortModel->mapFromSource(sourceIndex)
: QModelIndex());
} else {
setCurrentIndex(QModelIndex());
}
}
// show in callers/callees subwindow