From 9667e6f2589d5b2080cca928814f382761f8dda6 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 08 Apr 2005 22:05:03 +0000 Subject: utf8 kapi import fix --- (limited to 'kabc/vcardparser/vcardparser.cpp') diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index 7fae011..11622a0 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -126,12 +126,12 @@ VCard::List VCardParser::parseVCards( const QString& text ) // if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { // vCardLine.setValue( QString::fromUtf8( output.data(), output.size() ) ); // } else - vCardLine.setValue( output ); + vCardLine.setValueBytes( output ); //PP our vcards are *supposed* to be in UTF-8 // } else if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { // vCardLine.setValue( QString::fromUtf8( value.ascii() ) ); } else - vCardLine.setValue( value.replace( QRegExp("\\\\n"), "\n" ) ); + vCardLine.setValueString( value.replace( QRegExp("\\\\n"), "\n" ) ); currentVCard.addLine( vCardLine ); } @@ -188,7 +188,7 @@ QString VCardParser::createVCards( const VCard::List& list ) // iterate over the lines for ( lineIt = lines.begin(); lineIt != lines.end(); ++lineIt ) { - if ( !(*lineIt).value().asString().isEmpty() ) { + if ( !(*lineIt).valueString().isEmpty() ) { if ( (*lineIt).hasGroup() ) textLine = (*lineIt).group() + "." + (*lineIt).identifier(); else @@ -221,7 +221,7 @@ QString VCardParser::createVCards( const VCard::List& list ) KCodecs::quotedPrintableEncode( input, output ); textLine.append( ":" + QString( output ) ); } else - textLine.append( ":" + (*lineIt).value().asString().replace( QRegExp("\n"), "\\n" ) ); + textLine.append( ":" + (*lineIt).valueString().replace( QRegExp("\n"), "\\n" ) ); if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i ) -- cgit v0.9.0.2