D21655: KSelectionOwner usage in ApplicationX11 and Compositor classes
Vlad Zagorodniy <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
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