summaryrefslogtreecommitdiffstats
path: root/src/render/frontend/qmesh.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-11 19:21:40 +0100
committerSean Harmer <sean.harmer@kdab.com>2015-02-13 13:18:50 +0000
commit664b73dd36de6205cc84a219f936dd744a2dc184 (patch)
treee20915fb559ee380d794da2cb5294f4b6c0a18dc /src/render/frontend/qmesh.cpp
parent4ec502a7f8daf6560b0399106d0ceed91011e83c (diff)
Make mesh source url resolving compatible with Quick
The ideal way would be to call the function from QQmlFile but that would need a dependency on the qml module. So just copy the function in. Change-Id: If34d8a2356bbe87b2a011c1c25a79a3f24ebb1ab Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/frontend/qmesh.cpp')
-rw-r--r--src/render/frontend/qmesh.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/frontend/qmesh.cpp b/src/render/frontend/qmesh.cpp
index cc5bc3773..c2fb74cf1 100644
--- a/src/render/frontend/qmesh.cpp
+++ b/src/render/frontend/qmesh.cpp
@@ -43,6 +43,7 @@
#include <Qt3DRenderer/private/objloader_p.h>
#include <Qt3DCore/qscenepropertychange.h>
#include <Qt3DRenderer/private/renderlogging_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
QT_BEGIN_NAMESPACE
@@ -125,8 +126,7 @@ QMeshDataPtr MeshFunctor::operator()()
// TO DO: Handle file download if remote url
- // If the file contained :/ directly, is it mapped to "" when toString is called
- QString filePath = m_sourcePath.toString().replace(QStringLiteral("qrc:/"), QStringLiteral(":/"));
+ QString filePath = QUrlHelper::urlToLocalFileOrQrc(m_sourcePath);
if (loader.load(filePath))
return QMeshDataPtr(loader.mesh());