diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-05-23 12:28:46 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2018-05-25 06:30:41 +0000 |
commit | 8556133d620e7b64076d7b73de00451e16545c3b (patch) | |
tree | 2852c66e13dc166f21ce6a1576cdd551c8f15ae0 /tests/auto/qml/qqmltypeloader/data | |
parent | 047e3f480e9ebed55b21025f19ed7ed7351df118 (diff) |
On network redirects, update finalUrl, not url
We want all further imports to be relative to the redirected URL, not
the base one.
Note that this will incorporate any prior URL interceptions into the
final URL if a redirect happens. We don't really want this to happen
because the result of interception is not meant to be the base for
further URL lookup. However, as interception occurs before redirection,
this is unavoidable. Don't use URL interceptors on remote URLs.
Task-number: QTBUG-67882
Change-Id: I6693d14c8af8212dda9954d0bd0293c3c85441ef
(cherry picked from commit cda2680d801acce4e221b23e88d9b3c5504f86e8)
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmltypeloader/data')
5 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmltypeloader/data/Base.qml b/tests/auto/qml/qqmltypeloader/data/Base.qml new file mode 100644 index 0000000000..431c659424 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Base.qml @@ -0,0 +1,3 @@ +import QtQml 2.0 + +QtObject {} diff --git a/tests/auto/qml/qqmltypeloader/data/Load.qml b/tests/auto/qml/qqmltypeloader/data/Load.qml new file mode 100644 index 0000000000..0b893bb5cd --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/Load.qml @@ -0,0 +1,11 @@ +import QtQuick 2.0 + +Item { + property int xy: loader.xy + Loader { + id: loader + asynchronous: true + source: 'Base.qml' + property int xy: item.xy + } +} diff --git a/tests/auto/qml/qqmltypeloader/data/redirected/Imported.qml b/tests/auto/qml/qqmltypeloader/data/redirected/Imported.qml new file mode 100644 index 0000000000..62954fe1b2 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/redirected/Imported.qml @@ -0,0 +1,5 @@ +import QtQml 2.0 + +QtObject { + property int xy: 323232 +} diff --git a/tests/auto/qml/qqmltypeloader/data/redirected/Redirected.qml b/tests/auto/qml/qqmltypeloader/data/redirected/Redirected.qml new file mode 100644 index 0000000000..40fec5ed31 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/redirected/Redirected.qml @@ -0,0 +1,5 @@ +import QtQml 2.0 + +Imported { + +} diff --git a/tests/auto/qml/qqmltypeloader/data/redirected/qmldir b/tests/auto/qml/qqmltypeloader/data/redirected/qmldir new file mode 100644 index 0000000000..8eb1fa5c18 --- /dev/null +++ b/tests/auto/qml/qqmltypeloader/data/redirected/qmldir @@ -0,0 +1 @@ +Imported 1.0 Imported.qml |