projects
/
sdk
/
tools
/
heaptrack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f05c8d
)
Sort cost columns initially in descending order.
author
Milian Wolff
<mail@milianw.de>
Wed, 16 Dec 2015 11:56:54 +0000
(12:56 +0100)
committer
Milian Wolff
<mail@milianw.de>
Wed, 16 Dec 2015 11:56:54 +0000
(12:56 +0100)
gui/treemodel.cpp
patch
|
blob
|
history
diff --git
a/gui/treemodel.cpp
b/gui/treemodel.cpp
index
fcbf3fc
..
2aa992d
100644
(file)
--- a/
gui/treemodel.cpp
+++ b/
gui/treemodel.cpp
@@
-59,6
+59,14
@@
QVariant TreeModel::headerData(int section, Qt::Orientation orientation, int rol
if (orientation != Qt::Horizontal || section < 0 || section >= NUM_COLUMNS) {
return {};
}
+ if (role == Qt::InitialSortOrderRole) {
+ if (section == AllocatedColumn || section == AllocationsColumn
+ || section == PeakColumn || section == LeakedColumn
+ || section == TemporaryColumn)
+ {
+ return Qt::DescendingOrder;
+ }
+ }
if (role == Qt::DisplayRole) {
switch (static_cast<Columns>(section)) {
case FileColumn: