Diffstat (limited to 'kabc/vcardparser/vcardparser.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/vcardparser/vcardparser.cpp | 8 |
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 | |||
@@ -126,12 +126,12 @@ VCard::List VCardParser::parseVCards( const QString& text ) | |||
126 | // if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { | 126 | // if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { |
127 | // vCardLine.setValue( QString::fromUtf8( output.data(), output.size() ) ); | 127 | // vCardLine.setValue( QString::fromUtf8( output.data(), output.size() ) ); |
128 | // } else | 128 | // } else |
129 | vCardLine.setValue( output ); | 129 | vCardLine.setValueBytes( output ); |
130 | //PP our vcards are *supposed* to be in UTF-8 | 130 | //PP our vcards are *supposed* to be in UTF-8 |
131 | // } else if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { | 131 | // } else if ( vCardLine.parameter( "charset" ).lower() == "utf-8" ) { |
132 | // vCardLine.setValue( QString::fromUtf8( value.ascii() ) ); | 132 | // vCardLine.setValue( QString::fromUtf8( value.ascii() ) ); |
133 | } else | 133 | } else |
134 | vCardLine.setValue( value.replace( QRegExp("\\\\n"), "\n" ) ); | 134 | vCardLine.setValueString( value.replace( QRegExp("\\\\n"), "\n" ) ); |
135 | 135 | ||
136 | currentVCard.addLine( vCardLine ); | 136 | currentVCard.addLine( vCardLine ); |
137 | } | 137 | } |
@@ -188,7 +188,7 @@ QString VCardParser::createVCards( const VCard::List& list ) | |||
188 | 188 | ||
189 | // iterate over the lines | 189 | // iterate over the lines |
190 | for ( lineIt = lines.begin(); lineIt != lines.end(); ++lineIt ) { | 190 | for ( lineIt = lines.begin(); lineIt != lines.end(); ++lineIt ) { |
191 | if ( !(*lineIt).value().asString().isEmpty() ) { | 191 | if ( !(*lineIt).valueString().isEmpty() ) { |
192 | if ( (*lineIt).hasGroup() ) | 192 | if ( (*lineIt).hasGroup() ) |
193 | textLine = (*lineIt).group() + "." + (*lineIt).identifier(); | 193 | textLine = (*lineIt).group() + "." + (*lineIt).identifier(); |
194 | else | 194 | else |
@@ -221,7 +221,7 @@ QString VCardParser::createVCards( const VCard::List& list ) | |||
221 | KCodecs::quotedPrintableEncode( input, output ); | 221 | KCodecs::quotedPrintableEncode( input, output ); |
222 | textLine.append( ":" + QString( output ) ); | 222 | textLine.append( ":" + QString( output ) ); |
223 | } else | 223 | } else |
224 | textLine.append( ":" + (*lineIt).value().asString().replace( QRegExp("\n"), "\\n" ) ); | 224 | textLine.append( ":" + (*lineIt).valueString().replace( QRegExp("\n"), "\\n" ) ); |
225 | 225 | ||
226 | if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line | 226 | if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line |
227 | for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i ) | 227 | for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i ) |