Otherwise url() returns a wrong value if the part could not load the URL.
Diff Detail
Diff Detail
- Branch
- properly-emit-urlChanged
- Lint
No Linters Available - Unit
No Unit Test Coverage
Comment Actions
No.
The code inside openFile() expects url() to return the correct (target) URL. This is very important (e.g. to display an error message if it fails to load)
So this also means my previous comment in D6856 won't work.
Instead, we need
oldUrl --> newUrl --> QUrl() if it fails to load.
Comment Actions
Actually I am not sure if it is at all desirable to not "keep" the url even on failure.
E.g. it allows to try "reload" easily and people might just rely on that "bug".
Comment Actions
I would be ok with discarding this change (if D6856 goes in, we would have a way to explicitly reset the url, if necessary), but then we need to update the url() apidox because right now it claims: "Returns the URL currently opened in this part."