diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2018-10-25 13:32:08 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2018-10-25 13:14:10 +0000 |
commit | 10263f42de0d2d1fb731deb4213b76fa6c0acd0f (patch) | |
tree | c5431517ab811b1c5b1a9d2255d95d5618ae9340 /LICENSE.GPL2 | |
parent | d07e6b891e69c9ce4bed9e91c917d81d0d8a6ae1 (diff) | |
download | qttools-10263f42de0d2d1fb731deb4213b76fa6c0acd0f.tar.gz |
Assistant: Fix a crash when removing the docs
Inside the PreferencesDialog, when the currentRegisteredDocsSelection()
returns the unsorted list we may crash inside removeDocumentation().
Please note that we iterate through the currentSelection() list in the
reverse order. However, when the values are not sorted there, we may remove
items from entries list in a random order. After the first removal
the row index may point outside of the list or point to the wrong doc.
The fix is to sort the list returned by the currentRegisteredDocsSelection().
In this way we enure that we remove entries in the reverse order
and guarantee that values of the currentSelection list matche the indices
of the entries list.
Fixes: QTBUG-71399
Change-Id: I545f358e1d55e64823ffdaf0ce27a8b97aeedf04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'LICENSE.GPL2')
0 files changed, 0 insertions, 0 deletions