QDeclarativeSearchResultModel: modify a map's value in-place instead of overwriting


More efficient, because the copy taken from the element in the
container must needs detach on the remove call. Calling remove on the
element in the container, OTOH, requires no detach (unless the page is
otherwise shared, of course).

The old code wouldn't detach the whole map when the int was out of
range, but that's not the normal case.

Change-Id: I2febd591ff78cea86949aa068938a3be4ca115f0
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
commit6eef6e961bada90cdbfd5ef8539eecadf493d7d3
parentab02e8629d6272b00fbff24b38ee007358f184a1
authorMarc Mutz <marc.mutz@kdab.com>
committerMarc Mutz <marc.mutz@kdab.com>
commit timeWed, 10 Jul 2019 17:56:24 +0200