Fix ASAN warnings in XDGForeignV2Interface
The current code captures a char* from a wayland event in a lambda.
By creating the QString first when we capture that by value we'll
implicitly shallow copy it.
The other issue was
Even though where the iterator points to is still valid, the iterator
itself is an object that gets modified in erase which ASAN didn't like.
Those particular errors went away
Subscribers: plasma-devel, Frameworks
Differential Revision: https://phabricator.kde.org/D9319