invalidate message index when inserting in the middle
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Mon, 27 Apr 2015 18:04:26 +0000 (20:04 +0200)
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Thu, 30 Apr 2015 09:22:43 +0000 (09:22 +0000)
commita6ed9b418d1b4464f088b378e5bdb96ec420db6c
tree340e731984684982873a32a70b90dc5158bb369f
parent2d7a87870c5646e9a11f994e0f5e3dbe49228ece
invalidate message index when inserting in the middle

subsequent offsets become invalid when a message is inserted in the
middle, so the index must be invalidated (adjusting the offsets on the
fly doesn't seem worth it).
also, there is no point in updating the index if it is already invalid.

Task-number: QTBUG-45831
Change-Id: I9733cb3235c6b8b09dee7eae4d2ecf0a0cdda528
Reviewed-by: hjk <hjk@theqtcompany.com>
src/linguist/shared/translator.cpp
tests/auto/linguist/lconvert/data/idxmerge-add.ts [new file with mode: 0644]
tests/auto/linguist/lconvert/data/idxmerge.ts [new file with mode: 0644]
tests/auto/linguist/lconvert/data/idxmerge.ts.out [new file with mode: 0644]
tests/auto/linguist/lconvert/tst_lconvert.cpp