ItemDelegate: don't replace the user's text upon dataChanged()
ClosedPublic

Authored by dfaure on Mar 16 2019, 8:49 PM.

Details

Summary

When editing the same item twice rapidly, the changes being made
in the second editing were being reverted by the update coming
back from Akonadi due to the first editing.

Test Plan

Editing the same item twice no longer reverts the user's typed text

Diff Detail

Repository
R4 Zanshin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dfaure requested review of this revision.Mar 16 2019, 8:49 PM
dfaure created this revision.
ervin accepted this revision.Mar 18 2019, 10:20 AM

It almost asks for unit testing the behavior... but that looks really gruesome to test, so except if you got an idea let's get it merged.

This revision is now accepted and ready to land.Mar 18 2019, 10:20 AM

Yeah I thought about that, but it would be very low level, which wouldn't prove that the actual feature works (e.g. if Qt calls setEditorData more often that I thought, the unittest calling setEditorData directly wouldn't catch that).

This revision was automatically updated to reflect the committed changes.