Description
Regarding Thiago Macieira's comment on QTBUG-10146, QUrl isn't and won't ever be suitable to encode HTML form data, which is needed communicate with web applications. This is highly counter-intuitive, so it should be mentioned in the documentation.
Proposal for the method description of QUrl::addQueryItem():
Important Note:
This method is not suitable to add HTML form data to the query string. When communicating with web applications, always use instead:url.addEncodedQueryItem(QUrl::toPercentEncoding(key), QUrl::toPercentEncoding(value));
A similar note should be added to the documentation of QUrl::setQueryItems().
Proposal for the method description of QUrl::queryItemValue():
Important Note:
This method is not suitable to decode HTML form data from the query string. When communicating with web browsers, always use instead:QUrl::fromPercentEncoding(url.encodedQueryItemValue(key).replace('+', ' '));
A similar note should be added to the documentation of QUrl::queryItems().