qtmobility/src/versit/versitutils.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
--- a/qtmobility/src/versit/versitutils.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/src/versit/versitutils.cpp	Mon May 03 13:18:40 2010 +0300
@@ -53,42 +53,6 @@
 QByteArray VersitUtils::m_encodingMap[256];
 
 /*!
- * Performs backslash escaping for line breaks (CRLFs), semicolons, backslashes and commas according
- * to RFC 2426.  This is called on parameter names and values and property values.
- * Colons ARE NOT escaped because the examples in RFC2426 suggest that they shouldn't be.
- */
-void VersitUtils::backSlashEscape(QString& text)
-{
-    /* replaces ; with \;
-                , with \,
-                \ with \\
-     */
-    text.replace(QRegExp(QLatin1String("([;,\\\\])")), QLatin1String("\\\\1"));
-    // replaces any CRLFs with \n
-    text.replace(QRegExp(QLatin1String("\r\n|\r|\n")), QLatin1String("\\n"));
-}
-
-/*!
- * Removes backslash escaping for line breaks (CRLFs), colons, semicolons, backslashes and commas
- * according to RFC 2426.  This is called on parameter names and values and property values.
- * Colons ARE unescaped because the text of RFC2426 suggests that they should be.
- */
-void VersitUtils::removeBackSlashEscaping(QString& text)
-{
-    if (!(text.startsWith(QLatin1Char('"')) && text.endsWith(QLatin1Char('"')))) {
-        /* replaces \; with ;
-                    \, with ,
-                    \: with :
-                    \\ with \
-         */
-        text.replace(QRegExp(QLatin1String("\\\\([;,:\\\\])")), QLatin1String("\\1"));
-        // replaces \n with a CRLF
-        text.replace(QLatin1String("\\n"), QLatin1String("\r\n"), Qt::CaseInsensitive);
-    }
-}
-
-
-/*!
  * Encode \a ch with \a codec, without adding an byte-order mark
  */
 QByteArray VersitUtils::encode(char ch, QTextCodec* codec)