[server] Ensure we have a DataSource on the DataDevice in setSelection
ClosedPublic

Authored by graesslin on Oct 24 2016, 8:08 AM.

Details

Summary

SeatInterface provides a way to set the current selection. This method
did not verify whether the new DataDeviceInterface actually has a
DataSourceInterface. If there is no DataSourceInterface on that
DataDeviceInterface the selection should not be sent to the current
selection owner. This results in a crash as DataOfferInterface
(correctly) doesn't expect the passed in DataSourceInterface to be null.

To ensure we don't hit this again the DataOfferInterface ctor gained an
Q_ASSERT to validate the DataSourceInterface.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7631.Oct 24 2016, 8:08 AM
graesslin retitled this revision from to [server] Ensure we have a DataSource on the DataDevice in setSelection.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma on Wayland.
Restricted Application added a project: Plasma on Wayland. · View Herald TranscriptOct 24 2016, 8:08 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
bshah accepted this revision.Oct 25 2016, 9:51 AM
bshah added a reviewer: bshah.
This revision is now accepted and ready to land.Oct 25 2016, 9:51 AM