summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>2009-10-13 19:10:10 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-10-15 14:38:15 (GMT)
commit6a4d30b12baa85a223116d6629fa1e08e922d659 (patch)
tree658e26a8b3fcb1162c39974a0c81b93a68395868 /tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
parentaff8e7a24e5e8cc1f330a1b3c2947ba4d07d51ed (diff)
downloadQt-6a4d30b12baa85a223116d6629fa1e08e922d659.zip
Qt-6a4d30b12baa85a223116d6629fa1e08e922d659.tar.gz
Qt-6a4d30b12baa85a223116d6629fa1e08e922d659.tar.bz2
QGAL: refactor and document the simplification algorithm
Refactor the simplifyGraphIteration() function. The aim was to make it more clear without changing too much the way it does stuff. Before it collected a list of candidates and then filtered that into sublists of same order, and after that removed the center edges from the borders. It also reversed the list if the direction wasn't forward, to pass it in forward order to simplifySequentialChunk() helper function. The refactored version - take in account the order when building the candidates, this avoids index manipulation; - try to calculate 'beforeSequence' and 'afterSequence' as it builds the candidates list; - make simplifySequentialChunk() aware of directions, now it deals internally with reversed direction sequences. This commits also adds explanations to trickier parts of the code. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Diffstat (limited to 'tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp')
0 files changed, 0 insertions, 0 deletions