xcursor discovery: modernize
ClosedPublic

Authored by zx2c4 on Sep 14 2016, 10:38 AM.

Details

Summary

First we remove the fallback code for a version of Xcursor that
corresponds with an X server KDE doesn't even support any more.

Then we reverse the order of tilde expansion and deduplication, which
before was essentially incorrect.

Next we do deduplication properly, using Qt's removeDuplicates function.

Finally we replace the ugly regex with the helper function in
kcoreextras via std::transform.

This work here reflects the recent review and discussion that went into
the nearly identical code in kde-gtk-kcm.

Test Plan

Observe that cursors are correctly populated.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zx2c4 updated this revision to Diff 6724.Sep 14 2016, 10:38 AM
zx2c4 retitled this revision from to xcursor discovery: modernize.
zx2c4 updated this object.
zx2c4 edited the test plan for this revision. (Show Details)
zx2c4 added a reviewer: mart.
zx2c4 added a subscriber: plasma-devel.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 14 2016, 10:38 AM
mart accepted this revision.Sep 14 2016, 12:42 PM
mart edited edge metadata.
This revision is now accepted and ready to land.Sep 14 2016, 12:42 PM
This revision was automatically updated to reflect the committed changes.