D22195: Split Compositor class in Wayland and X11 child classes

Roman Gilg noreply at phabricator.kde.org
Wed Jul 10 11:14:39 BST 2019


romangg added a comment.


  In D22195#493439 <https://phabricator.kde.org/D22195#493439>, @zzag wrote:
  
  > Will support properties stay in the Compositor class?
  
  
  Yea, it's needed for the single case of a graphics reset through Gl error. I don't know if we could recover at all from that on Wayland, but I let it in for now.

INLINE COMMENTS

> zzag wrote in composite.h:49
> "For pointers or references, use a single space before '*' or '&', but not after"
> 
> (there are other places in this patch where whitespace for pointers needs to be fixed)

On function return values I prefer to put the asterisks without space next to the return type since it specifies the return type and not the function. If there are no counter arguments to that and you want to make a rule out of it we can discuss that at KWin sprint.

> zzag wrote in composite.h:192
> I guess we don't need it yet.

It's either way fine. I like to put the destructor in since most people expect it to be somewhere in a class and it's only a single line. Please don't let us discuss every little shit while ignoring the big picture.

> zzag wrote in dbusinterface.cpp:313
> I know that I already mentioned the problem with whitespace before pointers, but this one may not be obvious.
> 
> "For pointers or references, use a single space before '*' or '&', but not after"
> 
> applies to templates as well, so the static_cast will look like
> 
>   static_cast<X11Compositor *>(m_compositor)->....
> 
> (I hope that one day we will be able to run clang-format over KWin's code bbase)

It does not make sense to put a whitespace in this case, since there is no identifier to the right of the asterisks. Sticking to rules is fine, as long as it makes sense.

REPOSITORY
  R108 KWin

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

To: romangg, #kwin
Cc: anthonyfieroni, zzag, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190710/67136189/attachment.html>


More information about the kwin mailing list