Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
QUrl doesn't store the QString url that its ctor and fromString()/fromUserInput()/etc take¹, but saves a parsed-down version, so it's a perfect candidate for porting to QAnyStringView. The implementation of Private::parse() is screaming "port me to a view" as it's passing QString + offset around to helper functions.
Maybe we can use this opportunity to drop the UTF-16 in the implementation. URIs are more likely than not US-ASCII (certainly when percent-encoded), and given that Error is allocated lazily for memory reasons, using UTF-16 to hold the parsed components seems excessively laissez-faire.
¹ except in Error, but that's an error case, so shouldn't influence the design of the rest of the API.
Attachments
Issue Links
- is required for
-
QTBUG-101707 Port QCbor API to QAnyStringView keys
- Closed