summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-09-18 00:45:47 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2017-11-30 13:01:48 +0000
commit259197d8df913e115f9d21c8f08201fb3c9f2dbc (patch)
tree694ad82b06321316317265929d988ef168729618 /src/widgets/graphicsview
parentbdcbbd7d5ba41ef3aeb24c12ef22ad2fdb7aac90 (diff)
QTreeWidget::setHeaderItem: fix off-by-one in signal emissions
When setting a header item (that is, the item that provides the QTreeWidget's column) the widget needs to manipulate the underlying tree model and add or remove columns. This requires calling the right QAbstractItemModel APIs for structural model changes. The calculations done resulted in a off-by-one error: * if the model had N columns and needs to grow to M(>N), then one needs to begin insertion from N to M-1 (and not M); * if the model had N columns and needs to shrink to L(<N), then one needs to begin removal from L to N-1 (and not N). Add the -1s needed. Change-Id: Ic669788825a1c480376a08df0d7c9c10f91552ef Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/widgets/graphicsview')
0 files changed, 0 insertions, 0 deletions