summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2017-12-12 10:57:45 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2017-12-14 06:56:22 +0000
commitbc7397117c0273996b2a8ff8f0cfcbe120e5d2c6 (patch)
treed97fead35718be0525d2357ae789c9e7144655c9
parent938708cb23b90fac87bcab909555edfb748964be (diff)
Show qmlstreamer 'preview' content in viewer
QUrl::setScheme already adds two slashes, so adding two more just makes the URL parse incorrectly by QML engine. Apparently this has not been a problem with qrc: URLs but it is with file: URLs, which are used in previews. Task-number: QT3DS-671 Change-Id: I5d46282e94f816db8c0986be501038f80f63d972 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Marianne Yrjänä <marianne.yrjana@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/QtExtras/qmlstreamer/q3dsqmlstreamproxy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/QtExtras/qmlstreamer/q3dsqmlstreamproxy.cpp b/src/QtExtras/qmlstreamer/q3dsqmlstreamproxy.cpp
index 4c115f28..0cb6dbbd 100644
--- a/src/QtExtras/qmlstreamer/q3dsqmlstreamproxy.cpp
+++ b/src/QtExtras/qmlstreamer/q3dsqmlstreamproxy.cpp
@@ -147,13 +147,13 @@ QUrl Q3DSQmlStreamProxy::pathToUrl(const QString &path)
QUrl retval;
if (path.startsWith(QStringLiteral(":"))) {
retval.setScheme(QStringLiteral("qrc"));
- retval.setPath(QStringLiteral("//") + path.mid(1));
+ retval.setPath(path.mid(1));
} else if (path.startsWith(QStringLiteral("qrc:"), Qt::CaseInsensitive)) {
retval.setScheme(QStringLiteral("qrc"));
retval.setPath(path.mid(4));
} else {
retval.setScheme(QStringLiteral("file"));
- retval.setPath(QStringLiteral("//") + path);
+ retval.setPath(path);
}
return retval;
}