D28470: [PlasmaCore.IconItem] Refactor source handling for different types

Konrad Materka noreply at phabricator.kde.org
Sat Apr 4 13:05:45 BST 2020


kmaterka added a comment.


  In D28470#641230 <https://phabricator.kde.org/D28470#641230>, @davidre wrote:
  
  > In D28470#640468 <https://phabricator.kde.org/D28470#640468>, @cblack wrote:
  >
  > > Splitting into multiple classes seems like a good idea, but "strategy"? Seems like an odd choice of name to me.
  >
  >
  > I had assumed it's because of https://en.m.wikipedia.org/wiki/Strategy_pattern
  
  
  Yeah, I totally agree, it is really confusing now. I'm bad at creating class names :)
  I wanted to extract source handling (logic, internal state) to separate classes. "Handler" is overused, maybe something like this:
  IconItemSource (or AbstractIconItemSource, or AbstractSource), then:
  QImageSource (or QImageIconItemSource)
  QIconSource (or QIconIconItemSource)
  SvgSource (or SvgIconItemSource)
  What do you think?

REPOSITORY
  R242 Plasma Framework (Library)

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

To: kmaterka, #plasma, broulik, apol, davidedmundson
Cc: davidre, cblack, kde-frameworks-devel, #plasma, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200404/e9ab3df9/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list