Qt4-preview-feedback Archive, May 2007
Qt 4.3 QSortFilterProxyModel::dropMimeData() bug
Message 1 in thread
Hi,
I found a bug in QSortFilterProxyModel::dropMimeData() on Qt 4.3 (20070429).
This method maps the location of an item in the model where the drag
operation ended (row, column and parent index) and calls dropMimeData()
on the source model.
The problem will occur if the drop is done below the last child item of
a parent. In this particular case the parent index is valid, but the row
value is out of range (last child row + 1).
So doing the following will result in an invalid proxy_index and also a
invalid source_index:
QModelIndex proxy_index = index(row, column, parent);
QModelIndex source_index = d->proxy_to_source(proxy_index);
Then the following dropMimeData() call on the source model makes no sens:
d->model->dropMimeData(data, action, source_index.row(),
source_index.column(),
source_index.parent());
Best regards,
Alexandre
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx