Small improvements in IconItem
ClosedPublic

Authored by apol on May 29 2017, 3:20 PM.

Details

Summary

Don't construct a QUrl for every source strings. Check it's a file url
first (which is the only kind of url we support at the moment)
When extracting the path, use toLocalFile, so it works on platforms where
path!=toLocalPath (e.g. windows)
Don't split a string and get a chunk, but just extract the chunk we need
with section. Reduces allocations that are automatically discarded.
Narrow iconPath scope

Test Plan

Tests still pass, plasmashell still works

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.May 29 2017, 3:20 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptMay 29 2017, 3:20 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol updated this revision to Diff 14943.May 29 2017, 3:51 PM

Few additions

mart accepted this revision.May 29 2017, 4:36 PM
This revision is now accepted and ready to land.May 29 2017, 4:36 PM
This revision was automatically updated to reflect the committed changes.