On segunda-feira, 14 de maio de 2012 18.29.23, Thiago Macieira wrote: > == Proposal 2 => > So instead of adding decodedPath(), decodedUserName(), decodedPassword(), > etc. and cluttering the Qt5 QUrl API like the Qt4 one was, there's a > separate proposal: > > - add an option to QUrl::ComponentFormattingOptions to execute full > decoding - add a new value to QUrl::ParsingMode to indicate full decoded > parsing - modify all setters so that they take QUrl::ParsingMode too (like > QUrl::setUrl) > > These new options should not be allowed in QUrl's constructor, QUrl::setUrl, > QUrl::url, toString and toEncoded, for which full decoding creates > ambiguous data (the root flaw in QUrl in Qt 4). > > Pros over proposal 1: > - less API clutter > - centralised handling of the decoding and encoding > - also allows for StrictMode setting of components and error reporting > > Cons over proposal 1: > - less discoverable and harder to document that the option is needed in > cases like the FTP one above.
Proposal 2 is implemented at https://codereview.qt- project.org/#q,status:open+project:qt/qtbase+branch:master+topic:qurl-decoded- mode,n,z [tiny URL: <http://tinyurl.com/qurl-decoded-mode>] -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center Intel Sweden AB - Registration Number: 556189-6027 Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
