D21655: KSelectionOwner usage in ApplicationX11 and Compositor classes

Vlad Zagorodniy noreply at phabricator.kde.org
Tue Jun 18 21:34:13 BST 2019


zzag added inline comments.

INLINE COMMENTS

> romangg wrote in composite.cpp:71-89
> It's a scope question. CompositorSelectionOwner is only used internally by Compositor class while the header is included in many other source files. When CompositorSelectionOwner in the header this is not obvious, when it's in the source file it is.
> 
> In regards to the macro: according to docs <https://doc.qt.io/qt-5/qobject.html#Q_OBJECT> it is only needed when the class uses slots and signals. Well it does so why does it compile? Would it just fail at runtime?
> 
> Alternatives are to put the CompositorSelectionOwner class in a separate file or include the moc in the composite.cpp file.

> it is only needed when the class uses slots and signals

Not really, you need Q_OBJECT for other things too. In general, it's much easier to add Q_OBJECT and not worry about it.

REPOSITORY
  R108 KWin

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

To: romangg, #kwin, zzag
Cc: davidedmundson, sbergeron, zzag, kwin, LeGast00n, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, 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/20190618/292f4c1c/attachment.html>


More information about the kwin mailing list