UI: Remove OBSSceneItem QDataStream
Since the source list is a custom list model, the QDataStreams for OBSSceneItem are not needed.
This commit is contained in:
parent
6d86b58ed7
commit
1a2e5035c3
@ -196,30 +196,6 @@ QDataStream &operator>>(QDataStream &in, OBSScene &scene)
|
||||
return in;
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const OBSSceneItem &si)
|
||||
{
|
||||
obs_scene_t *scene = obs_sceneitem_get_scene(si);
|
||||
obs_source_t *source = obs_sceneitem_get_source(si);
|
||||
return out << QString(obs_source_get_name(obs_scene_get_source(scene)))
|
||||
<< QString(obs_source_get_name(source));
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, OBSSceneItem &si)
|
||||
{
|
||||
QString sceneName;
|
||||
QString sourceName;
|
||||
|
||||
in >> sceneName >> sourceName;
|
||||
|
||||
OBSSourceAutoRelease sceneSource =
|
||||
obs_get_source_by_name(QT_TO_UTF8(sceneName));
|
||||
|
||||
obs_scene_t *scene = obs_scene_from_source(sceneSource);
|
||||
si = obs_scene_find_source(scene, QT_TO_UTF8(sourceName));
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
void DeleteLayout(QLayout *layout)
|
||||
{
|
||||
if (!layout)
|
||||
|
@ -68,8 +68,6 @@ QDataStream &operator>>(QDataStream &in,
|
||||
std::vector<std::shared_ptr<OBSSignal>> &signal_vec);
|
||||
QDataStream &operator<<(QDataStream &out, const OBSScene &scene);
|
||||
QDataStream &operator>>(QDataStream &in, OBSScene &scene);
|
||||
QDataStream &operator<<(QDataStream &out, const OBSSceneItem &si);
|
||||
QDataStream &operator>>(QDataStream &in, OBSSceneItem &si);
|
||||
|
||||
QThread *CreateQThread(std::function<void()> func);
|
||||
|
||||
|
@ -284,7 +284,6 @@ OBSBasic::OBSBasic(QWidget *parent)
|
||||
qRegisterMetaTypeStreamOperators<std::vector<std::shared_ptr<OBSSignal>>>(
|
||||
"std::vector<std::shared_ptr<OBSSignal>>");
|
||||
qRegisterMetaTypeStreamOperators<OBSScene>("OBSScene");
|
||||
qRegisterMetaTypeStreamOperators<OBSSceneItem>("OBSSceneItem");
|
||||
#endif
|
||||
|
||||
ui->scenes->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user