disambiguated whether NodeParam::parent() would return a Node* or a QObject*

Old code assumes that a NodeParam's parent will always be a Node. The function
has been separated off and tweaked in the event that this is not the case.
This commit is contained in:
itsmattkc
2019-11-30 23:58:56 +11:00
parent a478b11fd0
commit 092d76f41a
15 changed files with 72 additions and 43 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ void VideoRenderWorker::RenderInternal(const NodeDependency& path)
// Get hash of node graph
// We use SHA-1 for speed (benchmarks show it's the fastest hash available to us)
QCryptographicHash hasher(QCryptographicHash::Sha1);
HashNodeRecursively(&hasher, path.node()->parent(), path.in());
HashNodeRecursively(&hasher, path.node()->parentNode(), path.in());
QByteArray hash = hasher.result();
if (frame_cache_->HasHash(hash)) {
@@ -123,7 +123,7 @@ void VideoRenderWorker::CloseInternal()
QVariant VideoRenderWorker::RenderAsSibling(NodeDependency dep)
{
NodeOutput* output = dep.node();
Node* original_node = output->parent();
Node* original_node = output->parentNode();
Node* node;
rational time = dep.in();
QVariant value;