Commit b3a64897 authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlProfiler: enabled sorting in Callers/Callees tabs

Change-Id: Ieede8580df9f9e7384865aaa9944a29925008fb1
Reviewed-on: http://codereview.qt.nokia.com/1758

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent f054d0dc
......@@ -50,9 +50,13 @@ public:
{
if (data().type() == QVariant::String) {
// first column
return data(FilenameRole).toString() == other.data(FilenameRole).toString() ?
if (column() == 0) {
return data(FilenameRole).toString() == other.data(FilenameRole).toString() ?
data(LineRole).toInt() < other.data(LineRole).toInt() :
data(FilenameRole).toString() < other.data(FilenameRole).toString();
} else {
return data().toString() < other.data().toString();
}
}
return data().toDouble() < other.data().toDouble();
......@@ -408,7 +412,7 @@ void QmlProfilerEventsView::buildModel()
bool hasBranches = d->m_fieldShown[Parents] || d->m_fieldShown[Children];
setRootIsDecorated(hasBranches);
setSortingEnabled(!hasBranches);
setSortingEnabled(true);
if (!hasBranches)
sortByColumn(d->m_firstNumericColumn,Qt::DescendingOrder);
......@@ -474,6 +478,7 @@ void QmlProfilerEventsView::QmlProfilerEventsViewPrivate::buildModelFromList( co
if (m_fieldShown[Details]) {
newRow << new EventsViewItem(*binding->details);
newRow.last()->setData(QVariant(*binding->details));
}
if (!newRow.isEmpty()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment