[Differential] [Commented On] D3240: [kstyle] Implement application unpolish to delete ShadowHelper

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Thu Nov 3 10:55:09 UTC 2016


graesslin added a comment.


  In https://phabricator.kde.org/D3240#60309, @hpereiradacosta wrote:
  
  > > For the general case you are right. Unpolish is only called from QApplication::setStyle when the old style gets destroyed. On Application tear-down it's not called.
  >
  > To be honest, I am a bit uneasy about this change. Sounds somewhat like abusing the API (since you then call the method explicitly in kwin). What if people later on start adding other "destruction" stuff in unpolish, unaware that it is actually not called ?
  >
  > Maybe something cleaner would be to move everything from the destructor to unpolish (with proper reassignment to nullptr), and then call unpolish explicitely in the destructor.
  >  The whole thing with tons of comments/warning ?
  
  
  I don't like calling virtual methods from a dtor, always a mess. But we can do a private cleanup method and call it from both dtor and unpolish. Would that be OK to you?

REPOSITORY
  rBREEZE Breeze

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #plasma, broulik, hpereiradacosta
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161103/bcff4e31/attachment.html>


More information about the Plasma-devel mailing list