diff options
author | François Andriot <albator78@libertysurf.fr> | 2013-06-24 19:50:32 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2013-06-24 19:50:32 +0200 |
commit | b4359e8bf97799f83dc1ca62744db7cfcc81bc87 (patch) | |
tree | 3346872613490cc467c19e1645d0026c1221bce7 /redhat/tdepim/kdepim-3.5.13-fix_kio_imap4_addquotes.patch | |
parent | 4cc71d79c5718d59078d06c497a56d7c05b41576 (diff) | |
download | tde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.tar.gz tde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.zip |
RPM Packaging: rename directories
Diffstat (limited to 'redhat/tdepim/kdepim-3.5.13-fix_kio_imap4_addquotes.patch')
-rw-r--r-- | redhat/tdepim/kdepim-3.5.13-fix_kio_imap4_addquotes.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/redhat/tdepim/kdepim-3.5.13-fix_kio_imap4_addquotes.patch b/redhat/tdepim/kdepim-3.5.13-fix_kio_imap4_addquotes.patch new file mode 100644 index 000000000..debb6ebd5 --- /dev/null +++ b/redhat/tdepim/kdepim-3.5.13-fix_kio_imap4_addquotes.patch @@ -0,0 +1,61 @@ +--- kdepim/libkmime/kmime_util.cpp.addquotes 2012-05-28 22:58:31.257167175 +0200 ++++ kdepim/libkmime/kmime_util.cpp 2012-05-29 20:02:19.679233274 +0200 +@@ -436,49 +436,26 @@ + + void removeQuots(TQCString &str) + { +- bool inQuote=false; +- +- for (int i=0; i < (int)str.length(); i++) { +- if (str[i] == '"') { +- str.remove(i,1); +- i--; +- inQuote = !inQuote; +- } else { +- if (inQuote && (str[i] == '\\')) +- str.remove(i,1); +- } +- } ++ str.replace(TQRegExp("\\\""), "\""); ++ str.replace(TQRegExp("\\\\"), "\\"); + } + + + void removeQuots(TQString &str) + { +- bool inQuote=false; +- +- for (int i=0; i < (int)str.length(); i++) { +- if (str[i] == '"') { +- str.remove(i,1); +- i--; +- inQuote = !inQuote; +- } else { +- if (inQuote && (str[i] == '\\')) +- str.remove(i,1); +- } +- } ++ str.replace(TQRegExp("\\\""), "\""); ++ str.replace(TQRegExp("\\\\"), "\\"); + } + + + void addQuotes(TQCString &str, bool forceQuotes) + { + bool needsQuotes=false; +- for (unsigned int i=0; i < str.length(); i++) { +- if (strchr("()<>@,.;:[]=\\\"",str[i])!=0) +- needsQuotes = true; +- if (str[i]=='\\' || str[i]=='\"') { +- str.insert(i, '\\'); +- i++; +- } +- } ++ if ( TQString( str ) .contains( TQRegExp( TQString( "\"|\\\\|=|\\]|\\[|:|;|,|\\.|,|@|<|>|\\)|\\(" ) ) ) ) ++ needsQuotes = true; ++ ++ str.replace(TQRegExp("\\"), "\\\\"); ++ str.replace(TQRegExp("\""), "\\\""); + + if (needsQuotes || forceQuotes) { + str.insert(0,'\"'); |