frontend: Use Q_OBJECT macro for BrowserDock#11785
Conversation
PatTheMav
left a comment
There was a problem hiding this comment.
This will require the source file to include the generated moc file as well, as adding Q_OBJECT will trigger such a pre-compilation iirc.
This is needed as the BrowserDock is a QObject.
|
Updated to also include the moc file. |
PatTheMav
left a comment
There was a problem hiding this comment.
Interesting that the "identity" of the final object is not inherited, even though it inherits from OBSDock which does have the Q_OBJECT decoration.
The Q_OBJECT macro tells Qt to generate MOC functions for the class and I don't think there's any way for it to automatically do that for something strictly based off subclassing.
This is not actually required afaik because of AUTOMOC in the Cmake files, though Qt will detect when a moc file is included explicitly, which can prevent multiple definition errors (As I learned recently working on properties-view stuff) |
Description
This is needed as the BrowserDock is a QObject.
Motivation and Context
Without this, #11784 fails to compile
How Has This Been Tested?
Compiled and ran OBS
Types of changes
Checklist: