From f08cf9044213a60c87e2bf299665d13a335feff5 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 13 Oct 2004 05:15:03 +0000 Subject: fixed some newline probs --- diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index f7e04a9..c368172 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp @@ -307,6 +307,7 @@ ContentLine::_assemble() ++cursor; } strRep_ += line.mid( cursor * maxLen ); + //qDebug("ContentLine::_assemble()\n%s*****", strRep_.data()); } void diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index ede5773..c31af46 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp @@ -848,10 +848,10 @@ Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl ) vstr.replace( "\\,", "," ); vstr.replace( "\\;", ";" ); */ - vstr.replace( QRegExp("\\n"), "\r\n" ); - vstr.replace( QRegExp("\\:"), ":" ); - vstr.replace( QRegExp("\\,"), "," ); - vstr.replace( QRegExp("\\;"), ";" ); + vstr.replace( QRegExp("\\\\n"), "\r\n" ); + vstr.replace( QRegExp("\\\\:"), ":" ); + vstr.replace( QRegExp("\\\\,"), "," ); + vstr.replace( QRegExp("\\\\;"), ";" ); Addressee *addr = new Addressee; readFromString( vstr, *addr ); 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 @@ -113,7 +113,7 @@ VCard::List VCardParser::parseVCards( const QString& text ) //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 ); 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 @@ -812,11 +812,11 @@ Agent VCardTool::parseAgent( const VCardLine &line ) 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 ) { -- cgit v0.9.0.2