Fix ASAN warnings in XDGForeignV2Interface

Authored by davidedmundson on Dec 13 2017, 10:31 PM.



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.

Test Plan

Ran test.
Those particular errors went away
Tests passed

Diff Detail

R127 KWayland
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Dec 13 2017, 10:31 PM
graesslin accepted this revision.Dec 14 2017, 5:45 AM
This revision is now accepted and ready to land.Dec 14 2017, 5:45 AM
This revision was automatically updated to reflect the committed changes.