ensure objects are in the correct thread when loading

Since we load in a separate thread, when the QObject based objects are
instantiated, they're created with affinity to that separate thread. Now we
specifically ensure they are moved to the main thread after their creation.
This commit is contained in:
itsmattkc
2020-01-14 00:10:21 +11:00
parent 16878e3c25
commit 0ea98be443
19 changed files with 231 additions and 134 deletions
+4 -2
View File
@@ -54,7 +54,7 @@ public:
virtual QString name() override;
virtual void Load(QXmlStreamReader* reader) override;
virtual void Load(QXmlStreamReader* reader, QHash<quintptr, NodeOutput*>& param_ptrs, QList<SerializedConnection> &input_connections) override;
virtual void Save(QXmlStreamWriter* writer) const override;
@@ -243,11 +243,13 @@ signals:
void KeyframeRemoved(NodeKeyframePtr key);
protected:
virtual void LoadInternal(QXmlStreamReader* reader);
virtual void LoadInternal(QXmlStreamReader* reader, QHash<quintptr, NodeOutput*>& param_ptrs, QList<SerializedConnection> &input_connections);
virtual void SaveInternal(QXmlStreamWriter* writer) const;
private:
void SaveConnections(QXmlStreamWriter* writer) const;
/**
* @brief Returns whether a data type can be interpolated or not
*/