From 89e5740a9567f592bedf73b25971d935a85da858 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Wed, 11 Apr 2012 11:42:31 +0300 Subject: QChar: documentation fixes Change-Id: Ic4b58ab811e53cf175ebaf0a67c40c56678f0f35 Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qchar.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp index 165bda7b05..ef229fc0fc 100644 --- a/src/corelib/tools/qchar.cpp +++ b/src/corelib/tools/qchar.cpp @@ -1238,9 +1238,23 @@ ushort QChar::toCaseFolded(ushort ucs2) Returns the Latin-1 character equivalent to the QChar, or 0. This is mainly useful for non-internationalized software. + \note It is not possible to distinguish a non-Latin-1 character from a Latin-1 0 + (NUL) character. Prefer to use unicode(), which does not have this ambiguity. + \sa toAscii(), unicode() */ +/*! + \fn QChar QChar::fromLatin1(char) + + Converts the Latin-1 character \a c to its equivalent QChar. This + is mainly useful for non-internationalized software. + + An alternative is to use QLatin1Char. + + \sa fromAscii(), unicode() +*/ + /*! \fn char QChar::toAscii() const @@ -1254,6 +1268,9 @@ ushort QChar::toCaseFolded(ushort ucs2) \note It is not possible to distinguish a non-Latin 1 character from an ASCII 0 (NUL) character. Prefer to use unicode(), which does not have this ambiguity. + \note This function does not check whether the character value is inside + the valid range of US-ASCII. + \sa toLatin1(), unicode() */ @@ -1307,7 +1324,7 @@ QDataStream &operator>>(QDataStream &in, QChar &chr) /*! \fn ushort QChar::unicode() const - \overload + Returns the numeric Unicode value of the QChar. */ /***************************************************************************** -- cgit v1.2.3