EffectMaker: Fix copying asset files during export

Fixes: QDS-11290
Change-Id: I54d7f618bcf1bed44d105ceb4e48fd6820d6b6ea
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-11-16 13:58:40 +02:00
parent 414649e385
commit af656a3b53

View File

@@ -702,7 +702,11 @@ void EffectMakerModel::exportResources(const QString &name)
QString imagePath = uniform->value().toString();
QFileInfo fi(imagePath);
QString imageFilename = fi.fileName();
sources.append(imagePath.remove(0, 7)); // Removes "file://"
if (imagePath.startsWith("file:")) {
QUrl url(imagePath);
imagePath = url.toLocalFile();
}
sources.append(imagePath);
dests.append(imageFilename);
}
}