diff options
Diffstat (limited to 'src/render/framegraph/qtechniquefilter.cpp')
-rw-r--r-- | src/render/framegraph/qtechniquefilter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/render/framegraph/qtechniquefilter.cpp b/src/render/framegraph/qtechniquefilter.cpp index 49ac03041..07707866c 100644 --- a/src/render/framegraph/qtechniquefilter.cpp +++ b/src/render/framegraph/qtechniquefilter.cpp @@ -85,6 +85,9 @@ void QTechniqueFilter::addMatch(QFilterKey *filterKey) if (!d->m_matchList.contains(filterKey)) { d->m_matchList.append(filterKey); + // Ensures proper bookkeeping + d->registerDestructionHelper(filterKey, &QTechniqueFilter::addMatch, d->m_matchList); + // We need to add it as a child of the current node if it has been declared inline // Or not previously added as a child of the current node so that // 1) The backend gets notified about it's creation @@ -110,6 +113,8 @@ void QTechniqueFilter::removeMatch(QFilterKey *filterKey) d->notifyObservers(change); } d->m_matchList.removeOne(filterKey); + // Remove bookkeeping connection + d->unregisterDestructionHelper(filterKey); } void QTechniqueFilter::addParameter(QParameter *parameter) @@ -119,6 +124,9 @@ void QTechniqueFilter::addParameter(QParameter *parameter) if (!d->m_parameters.contains(parameter)) { d->m_parameters.append(parameter); + // Ensures proper bookkeeping + d->registerDestructionHelper(parameter, &QTechniqueFilter::removeParameter, d->m_parameters); + // We need to add it as a child of the current node if it has been declared inline // Or not previously added as a child of the current node so that // 1) The backend gets notified about it's creation @@ -144,6 +152,8 @@ void QTechniqueFilter::removeParameter(QParameter *parameter) d->notifyObservers(change); } d->m_parameters.removeOne(parameter); + // Remove bookkeeping connection + d->unregisterDestructionHelper(parameter); } QVector<QParameter *> QTechniqueFilter::parameters() const |