mirror of
https://github.com/obsproject/obs-studio.git
synced 2025-12-28 07:55:01 +00:00
For custom types to become usable as QVariants they not only need to be declared as meta types, but also need to have appropriate stream operators declared. These declarations (both of the meta type itself, which provides a static meta type ID getter via the macro, as well as the operators) need to be visible to the compiler in any compilation unit where they might be used in their QVariant form, otherwise the templates will be incomplete. A blanket include of "qt-wrappers.hpp" in "OBSBasic.hpp" is not the most subtle fix, but it's necessary to ensure that the meta types are always "complete". Putting both declarations in the qt-wrappers header (instead of splitting them up) ensures that (as the classes themselves are declared in "obs.hpp", which is included by "qt-wrappers.hpp", and thus qt-wrappers can provide a complete class. |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| qt-wrappers.cpp | ||
| qt-wrappers.hpp | ||