diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-21 12:32:21 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-21 12:32:21 (GMT) |
commit | 45f372edda9d43bc98c7742a5dfdd89e4efbe225 (patch) | |
tree | 4b5e282a5959b2bc16a9f3d913e37791f16d9391 /src | |
parent | 86e5445e210f812e3f3059e175cce323c68ac216 (diff) | |
parent | 1075b98d6557e00618105a9d2ba58d1df9812633 (diff) | |
download | Qt-45f372edda9d43bc98c7742a5dfdd89e4efbe225.zip Qt-45f372edda9d43bc98c7742a5dfdd89e4efbe225.tar.gz Qt-45f372edda9d43bc98c7742a5dfdd89e4efbe225.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging:
Removed demo files accidentally introduced by commit 3abaecc3.
Doc: Added a link to the How to Learn Qt document.
Doc: Fixed shader program snippet.
Doc: Fixed page step sizes in a snippet for QAbstractScrollArea.
Doc: Moved general notes about character conversion.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurl.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index d551009..4226f9e 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -106,6 +106,19 @@ folding rules in QUrl conform to \l{RFC 3491} (Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)). + \section2 Character Conversions + + Follow these rules to avoid erroneous character conversion when + dealing with URLs and strings: + + \list + \o When creating an QString to contain a URL from a QByteArray or a + char*, always use QString::fromUtf8(). + \o Favor the use of QUrl::fromEncoded() and QUrl::toEncoded() instead of + QUrl(string) and QUrl::toString() when converting a QUrl to or from + a string. + \endlist + \sa QUrlInfo */ @@ -6514,16 +6527,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \o hostname becomes http://hostname \o /home/user/test.html becomes file:///home/user/test.html \endlist - - \section2 Tips to avoid erroneous character conversion when dealing with - URLs and strings: - - \list - \o When creating an URL QString from a QByteArray or a char*, always use - QString::fromUtf8(). - \o Favor the use of QUrl::fromEncoded() and QUrl::toEncoded() instead of - QUrl(string) and QUrl::toString() when converting QUrl to/from string. - \endlist */ QUrl QUrl::fromUserInput(const QString &userInput) { |