aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2022-10-25 12:38:14 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2022-10-25 10:09:18 +0000
commit001d55e1f0e8676acf4dbd0a309612f4b183f22f (patch)
tree53111f67ef782de22b58f2486a2b85e86c11bda2 /src
parent866a658b42ea5984ea367da616396dc951559ba1 (diff)
QmlDesigner: Fix empty texture source after drag to map property
FilePath::toUrl() returns an empty url if filepath doesn't have scheme/host set. This seems to be Qt 6.4 issue. Worked around the issue by just assigning the relative path directly without converting to url first, as I don't think there's ever going to be a case where the filepath will have proper scheme/host here. Fixes: QDS-8044 Change-Id: I37ae3875bf4386cffc122fd3b030f2b0bf068269 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
index 37015295a05..45eb5b69b4c 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
@@ -515,7 +515,7 @@ void PropertyEditorValue::commitDrop(const QString &path)
Utils::FilePath imagePath = Utils::FilePath::fromString(path);
Utils::FilePath currFilePath = QmlDesigner::DocumentManager::currentFilePath();
QmlDesigner::VariantProperty srcProp = texture.variantProperty("source");
- srcProp.setValue(imagePath.relativePathFrom(currFilePath).toUrl());
+ srcProp.setValue(imagePath.relativePathFrom(currFilePath).toString());
// assign the texture to the property
setExpressionWithEmit(texture.id());