summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoatheme.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-12-21 16:23:12 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-12-22 12:17:33 +0000
commit7353be1c6772dd1295fb5173298bd37ba8f6d1ca (patch)
treee898a66430db2e32eb278448361f5c7e8e39fa39 /src/plugins/platforms/cocoa/qcocoatheme.h
parent3690bcfda3e7c28789e1499996adfffde87ba150 (diff)
QGraphicsSceneBspTreeIndex: simplify the code of items()
The old code dealt with a lot of special cases, probably to avoid detaching. But the only case where deep copies are avoided is if a) there're no freeItemIndexes b) there're no unindexedItems c) the sort order is neither AcendingOrder nor DescendingOrder, which is funny, since those are the only two values for Qt::SortOrder. The code checks for SortOrder(-1), but nowhere in Qt is such a sort order created. Ergo, the deep copy was _never_ avoided. So simplify the code by always building the result list from the two input lists by copying all non-null items. Saves over 2KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I8e739fb78896b2ad0bec45d05e86a76fe1ede04a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoatheme.h')
0 files changed, 0 insertions, 0 deletions