From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'kabc/vcardparser') diff --git a/kabc/vcardparser/vcard.h b/kabc/vcardparser/vcard.h index 0bee441..85b50e4 100644 --- a/kabc/vcardparser/vcard.h +++ b/kabc/vcardparser/vcard.h @@ -24,14 +24,14 @@ #include "vcardline.h" #include #include -#include +#include namespace KABC { class VCard { public: - typedef QValueList List; + typedef Q3ValueList List; typedef QMap< QString, VCardLine::List > LineMap; enum Version { v2_1, v3_0 }; diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp index 8df2d32..c7254a0 100644 --- a/kabc/vcardparser/vcardline.cpp +++ b/kabc/vcardparser/vcardline.cpp @@ -19,6 +19,8 @@ */ #include "vcardline.h" +//Added by qt3to4: +#include using namespace KABC; @@ -43,7 +45,7 @@ VCardLine::VCardLine( const QString &identifier, const QString &value ) : d( 0 ) { mIdentifier = identifier; - mValue.assign( value.data(), value.length() ); + mValue = value; } VCardLine::VCardLine( const VCardLine& line ) @@ -86,7 +88,7 @@ void VCardLine::setValueString( const QString& value ) { setValueCString( value.utf8() ); } -void VCardLine::setValueCString( const QCString& value ) +void VCardLine::setValueCString( const Q3CString& value ) { mValue.duplicate( value.data(), value.length() ); } diff --git a/kabc/vcardparser/vcardline.h b/kabc/vcardparser/vcardline.h index 8dc9322..dc4bdec 100644 --- a/kabc/vcardparser/vcardline.h +++ b/kabc/vcardparser/vcardline.h @@ -22,8 +22,8 @@ #define VCARDLINE_H #include -#include -#include +#include +#include #include #include #include @@ -33,7 +33,7 @@ namespace KABC { class VCardLine { public: - typedef QValueList List; + typedef Q3ValueList List; typedef QMap ParamMap; VCardLine(); @@ -59,7 +59,7 @@ class VCardLine * Sets the value of of this line. */ void setValueString( const QString& value ); - void setValueCString( const QCString& value ); + void setValueCString( const Q3CString& value ); void setValueBytes( const QByteArray& value ); /** diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index 11622a0..a319531 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -218,7 +218,7 @@ QString VCardParser::createVCards( const VCard::List& list ) if ( encodingType == "b" ) KCodecs::base64Encode( input, output ); else if ( encodingType == "quoted-printable" ) - KCodecs::quotedPrintableEncode( input, output ); + KCodecs::quotedPrintableEncode( input, output, true ); textLine.append( ":" + QString( output ) ); } else textLine.append( ":" + (*lineIt).valueString().replace( QRegExp("\n"), "\\n" ) ); diff --git a/kabc/vcardparser/vcardtool.cpp b/kabc/vcardparser/vcardtool.cpp index 204326e..435c3b0 100644 --- a/kabc/vcardparser/vcardtool.cpp +++ b/kabc/vcardparser/vcardtool.cpp @@ -652,7 +652,7 @@ VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pi if ( pic.isIntern() ) { if ( !pic.data().isNull() ) { QByteArray input; - QDataStream s( input, IO_WriteOnly ); + QDataStream s( &input, QIODevice::WriteOnly ); s.setVersion( 4 ); s << pic.data(); line.setValueBytes( input ); -- cgit v0.9.0.2