X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Futil.h;h=486da25416e43be5bdb46ca024caa741d777c7e9;hb=a81a943bee20df3c7eb34bafb3e3fe878facfe4e;hp=8237e7c76c0cc526abb5ecb488802f098dc570c2;hpb=bb631d7ca67c86dd758428fb0e18b905514a16e3;p=evaf
diff --git a/src/libs/Common/util.h b/src/libs/Common/util.h
index 8237e7c..486da25 100644
--- a/src/libs/Common/util.h
+++ b/src/libs/Common/util.h
@@ -70,8 +70,10 @@ inline bool isFalse(QString const & str)
* @li QVariant::Int - base 10 is used;
* @li QVariant::Double - the decimal point is expecte to be '.' regardless which locale is used;
* @li QVariant::Bool - tries to use isTrue() and isFalse() methods; otherwise performs a conversion to QVariant::uint;
- * @li QVariant::Char - if the string begins with "\0x", expects it to be an ASCII code in hex; if the
- * string begins with "\0", expects it to be an ASCII code in oct; otherwise uses the first character in the string;
+ * @li QVariant::Char - if the string begins with "\0x", expects it to be a UTF-16 code in hex; if the
+ * string begins with "\0", expects it to be a UTF-16 code in oct; if the string begins with "&", expects it to
+ * be a numeric character reference ("nnnn;" or "hhhh;") or a predefined character entity reference;
+ * otherwise uses the first character in the string;
*/
COMMON_EXPORT QVariant toVariant(QString const & value, QVariant const & defaultValue);
@@ -85,6 +87,8 @@ COMMON_EXPORT QVariant toVariant(QString const & value, QVariant const & default
* be output directly as a printable 7-bit character are output as numeric character references. The result can be
* directly inserted into XML or HTML documents and later converted back with the eVaf::Common::strFromEscapedCharArray()
* function.
+ *
+ * For example, "GroÃ" becomes "Groß".
*/
COMMON_EXPORT QByteArray strToEscapedCharArray(QString const & str);
@@ -107,6 +111,8 @@ COMMON_EXPORT QString strFromEscapedCharArray(QByteArray const & str);
* directly as printable 7-bit characters are output as numeric character references. The result can be directly
* inserted into XML or HTML documents and later converted back with the eVaf::Common::binFromEscapedCharArray()
* function.
+ *
+ * For example, "Hello\r\n" becomes "Hello
".
*/
COMMON_EXPORT QByteArray binToEscapedCharArray(QByteArray const & src);