Documentation fixes and updates.
* @code
* [main]
* # The full name of this parameter is 'main/name'
- * name = MyApplication
+ * name = "My Application"
+ *
+ * # 4-byte binary version number 1.0.7.10 with the name 'main/version'
+ * version = �

*
* [extensions/about]
* # The full name of this parameter is 'extensions/about/module'
* @li Int - only base 10 (decimal) is allowed;
* @li Time - 24h time string in the format HH:MM:SS
* @li UInt - base 16 (hex) if the string is prefixed with '0x'; base 8 if the string starts with '0'; otherwise
- * the value is expected to be base 10 (decimal).
+ * the value is expected to be base 10 (decimal);
+ * @li ByteArray - non-printable bytes and special characters are encoded as numeric character or character entity references;
+ * @li String - non-printable and special characters are encoded as numeric character or character entity references.
+ *
+ * Strings and Byte array values can be enclosed in single or double quotes. The IniFile class does this automatically when
+ * saving String or Byte array values with leading or trailing spaces. Quotes are removed from the parameter value prior
+ * returning the value to the application. Use character entity references """ and "'" if quotes should be part of
+ * the parameter value.
*/
class COMMON_EXPORT IniFile
{
if (ok)
return QVariant(c);
}
+ else if (value.startsWith('&')) {
+ QString c = strFromEscapedCharArray(value.toLatin1());
+ if (c.size() > 0)
+ return QVariant(c.at(0));
+ }
else
return QVariant(value.at(0));
}
* @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 "&#xhhhh;") or a predefined character entity reference;
+ * otherwise uses the first character in the string;
*/
COMMON_EXPORT QVariant toVariant(QString const & value, QVariant const & defaultValue);
* 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);
* 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);
/**
* Module/library version number in the form major,minor,release,build
*/
-#define VER_FILE_VERSION 0,2,2,10
+#define VER_FILE_VERSION 0,2,2,11
/**
* Module/library version number in the string format (shall end with \0)
*/
-#define VER_FILE_VERSION_STR "0.2.2.10\0"
+#define VER_FILE_VERSION_STR "0.2.2.11\0"
/**
* Module/library name (shall end with \0)