In case of desktop:/ KIO which rewrites URLs, looking up the URL the trashed file got didn't work.
This resulted in trash:/filename being recorded by the undo manager which then failed to restore the file as it was actually trashed to e.g. trash:/0-filename
BUG: 391606
CHANGELOG: Undoing trashing files on the desktop has been fixed