summaryrefslogtreecommitdiffabout
path: root/kabc/vcardparser/vcardparser.cpp
Side-by-side diff
Diffstat (limited to 'kabc/vcardparser/vcardparser.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardparser/vcardparser.cpp8
1 files changed, 4 insertions, 4 deletions
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
@@ -123,18 +123,18 @@ VCard::List VCardParser::parseVCards( const QString& text )
KCodecs::quotedPrintableDecode( input, output );
}
//PP our vcards are *supposed* to be in UTF-8
// 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 );
}
// we do not save the start and end tag as vcardline
if ( (*it).lower().startsWith( "begin:vcard" ) ) {
@@ -185,13 +185,13 @@ QString VCardParser::createVCards( const VCard::List& list )
idents = (*cardIt).identifiers();
for ( identIt = idents.begin(); identIt != idents.end(); ++identIt ) {
lines = (*cardIt).lines( (*identIt) );
// 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
textLine = (*lineIt).identifier();
params = (*lineIt).parameterList();
@@ -218,13 +218,13 @@ QString VCardParser::createVCards( const VCard::List& list )
if ( encodingType == "b" )
KCodecs::base64Encode( input, output );
else if ( encodingType == "quoted-printable" )
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 )
text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" );
} else
text.append( textLine + "\r\n" );