Browse Source

frontend: Fix metatype declaration for scenes' SignalContainer

To be used as a QVariant, stream operators need to be provided
as the meta type will otherwise be considered "incomplete". These were
implemented before the frontend reorganization but not migrated as part
of it.
PatTheMav 4 months ago
parent
commit
8b7331642f
1 changed files with 13 additions and 0 deletions
  1. 13 0
      frontend/widgets/OBSBasic_Scenes.cpp

+ 13 - 0
frontend/widgets/OBSBasic_Scenes.cpp

@@ -37,6 +37,19 @@ template<typename OBSRef> struct SignalContainer {
 	OBSRef ref;
 	vector<shared_ptr<OBSSignal>> handlers;
 };
+
+QDataStream &operator<<(QDataStream &out, const SignalContainer<OBSScene> &v)
+{
+	out << v.ref;
+	return out;
+}
+
+QDataStream &operator>>(QDataStream &in, SignalContainer<OBSScene> &v)
+{
+	in >> v.ref;
+	return in;
+}
+
 } // namespace
 
 Q_DECLARE_METATYPE(obs_order_movement);