summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-09-13 14:05:08 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-09-13 14:05:08 (GMT)
commit6cd8a6001fe87107d32524c6115d37b620d3e108 (patch)
treedb8c882db3bf9dc359f39a6db514959efd5a1123 /src/corelib/io
parente98161b0062169b533eb2e11567ba28165a1141c (diff)
parentdfb50fd81e3dfb721cd60635c781125dbe42bfb1 (diff)
downloadQt-6cd8a6001fe87107d32524c6115d37b620d3e108.zip
Qt-6cd8a6001fe87107d32524c6115d37b620d3e108.tar.gz
Qt-6cd8a6001fe87107d32524c6115d37b620d3e108.tar.bz2
Merge branch 'fixesfor4.7' into 4.7
Conflicts: examples/tutorials/modelview/3_changingmodel/mymodel.h
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qurl.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 79a8ce4..56a03c9 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -4958,6 +4958,10 @@ void QUrl::setEncodedQuery(const QByteArray &query)
pairDelimiter(), and the key and value are delimited by
valueDelimiter().
+ \note This method does not encode spaces (ASCII 0x20) as plus (+) signs,
+ like HTML forms do. If you need that kind of encoding, you must encode
+ the value yourself and use QUrl::setEncodedQueryItems.
+
\sa setQueryDelimiters(), queryItems(), setEncodedQueryItems()
*/
void QUrl::setQueryItems(const QList<QPair<QString, QString> > &query)
@@ -5028,6 +5032,10 @@ void QUrl::setEncodedQueryItems(const QList<QPair<QByteArray, QByteArray> > &que
character returned by valueDelimiter(). Each key/value pair is
delimited by the character returned by pairDelimiter().
+ \note This method does not encode spaces (ASCII 0x20) as plus (+) signs,
+ like HTML forms do. If you need that kind of encoding, you must encode
+ the value yourself and use QUrl::addEncodedQueryItem.
+
\sa addEncodedQueryItem()
*/
void QUrl::addQueryItem(const QString &key, const QString &value)
@@ -5084,6 +5092,10 @@ void QUrl::addEncodedQueryItem(const QByteArray &key, const QByteArray &value)
/*!
Returns the query string of the URL, as a map of keys and values.
+ \note This method does not decode spaces plus (+) signs as spaces (ASCII
+ 0x20), like HTML forms do. If you need that kind of decoding, you must
+ use QUrl::encodedQueryItems and decode the data yourself.
+
\sa setQueryItems(), setEncodedQuery()
*/
QList<QPair<QString, QString> > QUrl::queryItems() const
@@ -5188,6 +5200,10 @@ bool QUrl::hasEncodedQueryItem(const QByteArray &key) const
Returns the first query string value whose key is equal to \a key
from the URL.
+ \note This method does not decode spaces plus (+) signs as spaces (ASCII
+ 0x20), like HTML forms do. If you need that kind of decoding, you must
+ use QUrl::encodedQueryItemValue and decode the data yourself.
+
\sa allQueryItemValues()
*/
QString QUrl::queryItemValue(const QString &key) const
@@ -5232,6 +5248,10 @@ QByteArray QUrl::encodedQueryItemValue(const QByteArray &key) const
Returns the a list of query string values whose key is equal to
\a key from the URL.
+ \note This method does not decode spaces plus (+) signs as spaces (ASCII
+ 0x20), like HTML forms do. If you need that kind of decoding, you must
+ use QUrl::allEncodedQueryItemValues and decode the data yourself.
+
\sa queryItemValue()
*/
QStringList QUrl::allQueryItemValues(const QString &key) const
@@ -5610,7 +5630,7 @@ QString QUrl::toString(FormattingOptions options) const
if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority) {
bool doFileScheme = d->scheme == QLatin1String("file") && ourPath.startsWith(QLatin1Char('/'));
QString tmp = d->authority(options);
- if (!tmp.isEmpty() || doFileScheme) {
+ if (!tmp.isNull() || doFileScheme) {
if (doFileScheme && !ourPath.startsWith(QLatin1Char('/')))
url += QLatin1Char('/');
url += QLatin1String("//");