QUrl no longer accepts an empty authority and a non-empty path that
starts with '//' (Qt commit f62768d046528636789f901ac79e2cfa1843a7b7).
As the result, protocol selection using the menu no longer worked for
all but 'file' scheme.
Details
- Reviewers
dfaure - Group Reviewers
Frameworks - Commits
- R241:37868c2c57f7: Fix protocol selection in KUrlNavigator
Diff Detail
- Repository
- R241 KIO
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Thanks for the fix. I have one small suggestion.
src/filewidgets/kurlnavigator.cpp | ||
---|---|---|
349–355 | Is this in order to get smb:// instead of smb: ? It looks correct, but not for "file", how about moving that to an else{} branch of the if below? And I could add a comment like "we want smb:// or ftp://, not just smb: or ftp:". |
src/filewidgets/kurlnavigator.cpp | ||
---|---|---|
349–355 |
Yes.
Why not? If I read RFC 8089 correctly, for host rule it references RFC 3986 which allows it to be empty, i.e. an empty authority is valid.
Makes sense, indeed. Will do shortly. |
src/filewidgets/kurlnavigator.cpp | ||
---|---|---|
349–355 | Well, OK, it's not that it's *incorrect* for file:, it just seems unnecessary to make that method call. So given that we have an if() already, why not only do it in the else? |
- Move setting authority to the else branch
src/filewidgets/kurlnavigator.cpp | ||
---|---|---|
349–355 |
Ah, I misunderstood what you meant.
Done. |