Hello again!
I stumbled into this behavior again, as one of my files, where I used relative paths, has changed its Qt.resolvedUrl behavior "overnight".
I was not yet able to find out which commit has broken it, as the the built binaries do no behave the same all times, weird... :O
The file lies under @/Base/Interface/+foo/ and Qt.resolvedUrl("../") does now resolve to qrc:/Interface/+foo/ and not qrc:/ as like before.
The need for using relative paths came as the absolute paths with "qrc:/" were not working as expected under all circumstances (see previous post).
So I decided to give that a closer look again.
Here is what I found out so far:
All that cases I had shown in the first part of the previous post, do work correctly when I encapsulate the source's string into a Qt.resolvedUrl.
That means, I no longer get a completely different result for
Image {
source: "qrc:/Assets" + "/logo.png"
when I do that by saying:
Image {
source: Qt.resolvedUrl("qrc:/Assets" + "/logo.png")
With that the image's source gets resolved correctly to qrc:/Assets/+foo/+bar/logo.png
The same counts for
StateChangeScript {
script: imageSource = Qt.resolvedUrl("qrc:/Assets/error.png")
}
where 'imageSource' is still a property of type string, but the image's source gets resolved correctly to qrc:/Assets/+foo/+bar/error.png.
And also for
PropertyChanges {
target: image
source: Qt.resolvedUrl("qrc:/Assets/error.png")
}
the source gets resolved correctly to qrc:/Assets/+foo/error.png
Does anyone have a clue on what Qt.resolvedUrl does in an other way than the implicit conversion of strings to urls?
Naively you will think like, this will happen internally by using Qt.resolvedUrl, but yeah...
Regards, matzze.