Diffusion KIO 1449ecf136b5

Ensure KDirLister updates items whose target URL has changed.

Authored by dfaure on Jul 22 2017, 6:43 AM.

Description

Ensure KDirLister updates items whose target URL has changed.

This fixes the bug where renaming a desktop icon would not update
its target URL, so clicking on it would try to open the old file.

The tricky bit in all this is that first KCoreDirLister::slotFileRenamed
is called, which updates the item's name (and local path), but then
later on desktopnotifier also triggers a full re-listing via
KDirNotify::FilesAdded which calls KCoreDirLister::updateDirectory.
That's when the dirlister should notice that the target URL of the item
has changed.

For consistency, also compare local paths, although this commit doesn't
actually require it.

Unittest improved in plasma-workspace/kioslave/desktop/tests.

BUG: 382341
FIXED-IN: 5.37

Details

Committed
dfaureJul 22 2017, 6:52 AM
Parents
R241:36aee9215a1f: Fix kdirwatch warning
Branches
Unknown
Tags
Unknown