author | zautrix <zautrix> | 2004-10-13 05:15:03 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-13 05:15:03 (UTC) |
commit | f08cf9044213a60c87e2bf299665d13a335feff5 (patch) (side-by-side diff) | |
tree | c9c0e8b0f7f7a48dcee8fbdd5b9a467985c78fdd /kabc/vcardparser | |
parent | 308bc78a3ab0d27718070a5ebdf3f019ac570c6b (diff) | |
download | kdepimpi-f08cf9044213a60c87e2bf299665d13a335feff5.zip kdepimpi-f08cf9044213a60c87e2bf299665d13a335feff5.tar.gz kdepimpi-f08cf9044213a60c87e2bf299665d13a335feff5.tar.bz2 |
fixed some newline probs
-rw-r--r-- | kabc/vcardparser/vcardparser.cpp | 2 | ||||
-rw-r--r-- | kabc/vcardparser/vcardtool.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index 9ea084d..bec2a0c 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -104,25 +104,25 @@ VCard::List VCardParser::parseVCards( const QString& text ) qDebug("****************************************** "); qDebug("************* WARNING ******************** "); qDebug("****************************************** "); qDebug("Make sure, the decoding is done after"); qDebug("QVariant conversion!"); qDebug("Insert Line DECODING OKAY, where this is implemented"); // use for decoding the above code! vCardLine.setValue( cs ); } else { //qDebug("VCardParser::parseVCards has to be verified"); //US vCardLine.setValue( value.replace( "\\n", "\n" ) ); - vCardLine.setValue( value.replace( QRegExp("\\n"), "\n" ) ); + vCardLine.setValue( value.replace( QRegExp("\\\\n"), "\n" ) ); } currentVCard.addLine( vCardLine ); } // we do not save the start and end tag as vcardline if ( (*it).lower().startsWith( "begin:vcard" ) ) { inVCard = true; //qDebug("VCardParser::parseVCards has to be verified"); //US currentLine.setLength( 0 ); currentLine = ""; currentVCard.clear(); // flush vcard continue; diff --git a/kabc/vcardparser/vcardtool.cpp b/kabc/vcardparser/vcardtool.cpp index 3fb212e..d1f823b 100644 --- a/kabc/vcardparser/vcardtool.cpp +++ b/kabc/vcardparser/vcardtool.cpp @@ -803,29 +803,29 @@ Agent VCardTool::parseAgent( const VCardLine &line ) } else { QString str = line.value().asString(); //US using the old implementation instead qDebug("VCardTool::parseAgent has to be verified"); /*US str.replace( "\\n", "\r\n" ); str.replace( "\\N", "\r\n" ); str.replace( "\\;", ";" ); str.replace( "\\:", ":" ); str.replace( "\\,", "," ); */ - str.replace( QRegExp("\\n") , "\r\n" ); - str.replace( QRegExp("\\N") , "\r\n" ); - str.replace( QRegExp("\\;") , ";" ); - str.replace( QRegExp("\\:") , ":" ); - str.replace( QRegExp("\\,") , "," ); + str.replace( QRegExp("\\\\n") , "\r\n" ); + str.replace( QRegExp("\\\\N") , "\r\n" ); + str.replace( QRegExp("\\\\;") , ";" ); + str.replace( QRegExp("\\\\:") , ":" ); + str.replace( QRegExp("\\\\,") , "," ); Addressee::List list = parseVCards( str ); if ( list.count() > 0 ) { Addressee *addr = new Addressee; *addr = list[ 0 ]; agent.setAddressee( addr ); } } return agent; } |