summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Project
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2019-03-18 11:26:05 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2019-03-18 10:28:46 +0000
commit15720a392d9eb0c09c240fe00146a6d0fbbf9798 (patch)
tree93e661fd238531fd5efac5247704c74d9bc1efaf /src/Authoring/Studio/Palettes/Project
parent5677201fe7c560564e16ae61452fbfe5c0fe5ea8 (diff)
Fix qml asset import on non-windows
Task-number: QT3DS-3007 Change-Id: I0205c06e4015383a1778ffc9eae440b9d9b46964 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Project')
-rw-r--r--src/Authoring/Studio/Palettes/Project/ProjectFileSystemModel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Authoring/Studio/Palettes/Project/ProjectFileSystemModel.cpp b/src/Authoring/Studio/Palettes/Project/ProjectFileSystemModel.cpp
index 51126536..875954f3 100644
--- a/src/Authoring/Studio/Palettes/Project/ProjectFileSystemModel.cpp
+++ b/src/Authoring/Studio/Palettes/Project/ProjectFileSystemModel.cpp
@@ -384,6 +384,10 @@ void ProjectFileSystemModel::getQmlAssets(const QObject *qmlNode,
else if (assetSrc.startsWith(QLatin1String("file://")))
assetSrc = assetSrc.mid(7);
+#if !defined(Q_OS_WIN)
+ // Only windows has drive letter in the path, other platforms need to start with /
+ assetSrc.prepend(QLatin1Char('/'));
+#endif
outAssetPaths.insert(assetSrc);
}