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

Authored by hein on Feb 1 2019, 11:07 AM.

Description

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

Summary:
This was a regression caused by the code attempting to insert new items
at drop position, if available. setSortMode was being called in a slot
connected to the dir model's rowsInserted, but the Positioner has to be
initialized earlier as a proxy needs to handle
sourceRowsAboutToBeInserted as well.

Thanks to an investigation and patch by Oleg Solovyov in D17689 for
helping to get to the bottom of this.

This is aimed at 5.12+.

BUG:401023

Reviewers: Plasma, McPain, davidedmundson

Reviewed By: Plasma, davidedmundson

Subscribers: ngraham, davidedmundson, fvogt, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D18182

Details