[xembedsniproxy] Free windowAttributes in every case
ClosedPublic

Authored by wbauer on Jun 26 2017, 10:10 AM.

Details

Summary

The structure was only freed in case the XTest method was chosen.
But it should always be freed of course (as long as it isn't NULL).

Use a QScopedPointer instead to free it automatically when it goes out of scope and to be more consistent with the rest of the code.

Test Plan

Builds, old-style system tray icons are still displayed here.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
wbauer created this revision.Jun 26 2017, 10:10 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 26 2017, 10:10 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Jun 26 2017, 10:13 AM

Urgh, how did I not catch that last review.

Might be better to just swap with:

QScopedPointer<xcb_whatever_reply_t, QScopedPointerPodDeleter> = xcb_get_window_attrib

which we do for the other replies

This revision is now accepted and ready to land.Jun 26 2017, 10:13 AM
wbauer updated this revision to Diff 15883.Jun 26 2017, 3:37 PM
wbauer edited the summary of this revision. (Show Details)

Use a QScopedPointer instead of manually calling free()

davidedmundson accepted this revision.Jun 26 2017, 3:37 PM
This revision was automatically updated to reflect the committed changes.