fvogt added a comment.
Restricted Application edited projects, added KWin; removed Plasma.


  In https://phabricator.kde.org/D10236#199259, @graesslin wrote:
  
  > In https://phabricator.kde.org/D10236#199252, @fvogt wrote:
  >
  > > Now you can remove the initial setting of `m_device` as well.
  >
  >
  > I thought about it while doing the change. I decided against it for the 
following reasons:
  >
  > - it would need to be inited with null instead
  
  
  Alternatively just call `device()` once explicitly in the constructor to 
avoid code duplication.
  That way the lazyness of `device()` is lost, but that's not a goal anyway.
  
  > - the norm is not having this problem, the switch event is an exception
  
  It's not, this can happen to literally any event if they get queued together.
  
  > - device would have to lose the const-ness, the const_cast hack is in my 
opinion only a valid solution for exceptions, for the standard case it would 
have to be changed.
  
  Just set `m_device` as `mutable` instead, that's what it's intended for.

REPOSITORY
  R108 KWin

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

To: graesslin, #kwin, #plasma, fvogt
Cc: plasma-devel, kwin, iodelay, bwowk, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart

Reply via email to