D18182: Fix new file creation leading to dupe items on a fresh view

David Edmundson noreply at phabricator.kde.org
Fri Feb 1 10:11:04 GMT 2019


davidedmundson accepted this revision.
davidedmundson added inline comments.

INLINE COMMENTS

> davidedmundson wrote in foldermodel.cpp:170
> I'm a bit worried about queuing something with indexes. Indexes are only valid at that exact moment.
> 
> If the source model does the following:
> beginInsertRows(AA);
> endInsertRows()
> beginInsertRows(BB);
> endInsertRows()
> then exits back to the event loop
> 
> When you process the delayed connection for the first insertion the old first/last could be pointing anywhere.
> 
> We could maybe get round this by converting to QPeristentModelIndexes immediately, then queue up the operation that uses them.

Also I don't think I understand this:

- Delay this via queued connection, such that the row is available and can be mapped

at the point of rowsInserted() the row should be available, If not we have a source model bug.

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D18182

To: hein, #plasma, McPain, davidedmundson
Cc: ngraham, davidedmundson, fvogt, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190201/bb98e3b7/attachment.html>


More information about the Plasma-devel mailing list