diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-02-11 19:21:40 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-02-13 13:18:50 +0000 |
commit | 664b73dd36de6205cc84a219f936dd744a2dc184 (patch) | |
tree | e20915fb559ee380d794da2cb5294f4b6c0a18dc /src/render/frontend/qtextureimage.cpp | |
parent | 4ec502a7f8daf6560b0399106d0ceed91011e83c (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/qtextureimage.cpp')
-rw-r--r-- | src/render/frontend/qtextureimage.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/frontend/qtextureimage.cpp b/src/render/frontend/qtextureimage.cpp index 62ea6cc80..92b69797f 100644 --- a/src/render/frontend/qtextureimage.cpp +++ b/src/render/frontend/qtextureimage.cpp @@ -36,6 +36,7 @@ #include "qtextureimage.h" #include "qabstracttextureimage_p.h" +#include <Qt3DCore/private/qurlhelper_p.h> QT_BEGIN_NAMESPACE @@ -66,7 +67,7 @@ public: { TexImageDataPtr dataPtr; if (m_url.isLocalFile() || m_url.scheme() == QStringLiteral("qrc")) { - QString source = m_url.toString().replace(QStringLiteral("qrc"), QStringLiteral("")); + QString source = QUrlHelper::urlToLocalFileOrQrc(m_url); QImage img; if (img.load(source)) { dataPtr.reset(new TexImageData()); |