Graphicsview: Simplify code

order is either Ascending or Descending (0 or 1), so this comparison is
unnecessary.

Change-Id: Ieceacf18f1bf3c7a7555205a140b738daa92bd04
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
Tobias Hunger 2013-08-29 11:40:48 +02:00 committed by The Qt Project
parent 1b5848957b
commit 585758389c

View File

@ -567,10 +567,7 @@ QList<QGraphicsItem *> QGraphicsSceneBspTreeIndex::items(Qt::SortOrder order) co
itemList << item; itemList << item;
} }
} }
if (order != -1) { d->sortItems(&itemList, order, d->sortCacheEnabled);
//We sort descending order
d->sortItems(&itemList, order, d->sortCacheEnabled);
}
return itemList; return itemList;
} }