D6014: Small improvements in IconItem

Aleix Pol Gonzalez noreply at phabricator.kde.org
Mon May 29 15:20:30 UTC 2017


apol created this revision.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added a subscriber: plasma-devel.

REVISION 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

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D6014

AFFECTED FILES
  src/declarativeimports/core/iconitem.cpp
  src/plasma/svg.cpp

To: apol, #frameworks, #plasma
Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170529/38a2b48b/attachment.html>


More information about the Plasma-devel mailing list