src/corelib/io/qurl.cpp
changeset 37 758a864f9613
parent 30 5dc02b23752f
--- a/src/corelib/io/qurl.cpp	Fri Sep 17 08:34:18 2010 +0300
+++ b/src/corelib/io/qurl.cpp	Mon Oct 04 01:19:32 2010 +0300
@@ -4958,6 +4958,10 @@
     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 @@
     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 @@
 /*!
     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 @@
     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 @@
     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 @@
     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("//");