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