EffectComposer: Delete obsolete resource files at effect save

If a new version of same effect is saved, remove files that are
no longer part of the effect from the effect import dir after the save.

Fixes: QDS-11737
Change-Id: Iae4da39f9f4713c2e26f1b90263881c8c9e13d78
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2024-02-05 14:59:46 +02:00
parent 9201491292
commit ca9e72fe6c
13 changed files with 109 additions and 15 deletions

View File

@@ -31,8 +31,13 @@ EffectNode::EffectNode(const QString &qenPath)
m_description = node.description();
const QList<Uniform *> uniforms = node.uniforms();
for (const Uniform *uniform : uniforms)
for (const Uniform *uniform : uniforms) {
m_uniformNames.insert(uniform->name());
if (uniform->type() == Uniform::Type::Sampler) {
m_defaultImagesHash.insert(
uniform->name(), uniform->defaultValue().toString());
}
}
}
QString EffectNode::name() const