Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:PowerPC
kdepim3
kdepim-trinity-imap-optimize.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdepim-trinity-imap-optimize.patch of Package kdepim3
--- a/libkmime/kmime_util.cpp 2012-05-28 22:58:31.257167175 +0200 +++ b/libkmime/kmime_util.cpp 2012-05-29 20:02:19.679233274 +0200 @@ -436,49 +436,26 @@ void removeQuots(QCString &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(QRegExp("\\\""), "\""); + str.replace(QRegExp("\\\\"), "\\"); } void removeQuots(QString &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(QRegExp("\\\""), "\""); + str.replace(QRegExp("\\\\"), "\\"); } void addQuotes(QCString &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 ( QString( str ) .contains( QRegExp( QString( "\"|\\\\|=|\\]|\\[|:|;|,|\\.|,|@|<|>|\\)|\\(" ) ) ) ) + needsQuotes = true; + + str.replace(QRegExp("\\"), "\\\\"); + str.replace(QRegExp("\""), "\\\""); if (needsQuotes || forceQuotes) { str.insert(0,'\"');
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor