Small improvements in IconItem

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

Description

Small improvements in IconItem

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

Reviewers: Frameworks, Plasma, mart

Reviewed By: Plasma, mart

Subscribers: plasma-devel

Tags: Plasma, Frameworks

Differential Revision: https://phabricator.kde.org/D6014

Details

Committed
apolMay 29 2017, 5:10 PM
Reviewer
Plasma
Differential Revision
D6014: Small improvements in IconItem
Parents
R242:68ed01638c9a: API dox: Use doxygen notation to have comments used
Branches
Unknown
Tags
Unknown