D23582: [platforms/x11] Make X11WindowedOutput::init() private

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added a comment.


  > It just swaps one bad thing for one equally bad.
  
  Yeah, what we have now and what friend keyword is are not far from each other. However, it's better to judge this revision by the end result. Public interface of X11WindowedOutput is leaner with less clutter.
  
  > Anyway, in this case the args and everything can just go in the constructor. You solve the case of being called multiple times and from which class all in one go.
  
  Totally agreed, we should embrace RAII rather than fight it, but sometimes it's better to go a bit off road in order to not go insane, for example would you be happy to work with QOpenGLTexture if it had a huge constructor with all possible parameters and no create() method, or if you had to fill in a struct with all parameters (hello, Vulkan!) and pass it to a constructor? :)
  
  As for this patch, I think we can stick with private init() method for now and gradually switch to RAII wherever it's a reasonable thing to do.

REPOSITORY
  R108 KWin

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

To: zzag, #kwin
Cc: davidedmundson, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.