summaryrefslogtreecommitdiffabout
path: root/kabc/vcardparser
Side-by-side diff
Diffstat (limited to 'kabc/vcardparser') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardparser/vcard.h4
-rw-r--r--kabc/vcardparser/vcardline.cpp6
-rw-r--r--kabc/vcardparser/vcardline.h8
-rw-r--r--kabc/vcardparser/vcardparser.cpp2
-rw-r--r--kabc/vcardparser/vcardtool.cpp2
5 files changed, 12 insertions, 10 deletions
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
@@ -21,20 +21,20 @@
#ifndef VCARDPARSER_VCARD_H
#define VCARDPARSER_VCARD_H
#include "vcardline.h"
#include <qmap.h>
#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <q3valuelist.h>
namespace KABC {
class VCard
{
public:
- typedef QValueList<VCard> List;
+ typedef Q3ValueList<VCard> List;
typedef QMap< QString, VCardLine::List > LineMap;
enum Version { v2_1, v3_0 };
VCard();
VCard( const VCard& );
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
@@ -16,12 +16,14 @@
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "vcardline.h"
+//Added by qt3to4:
+#include <Q3CString>
using namespace KABC;
class VCardLine::VCardLinePrivate
{
public:
@@ -40,13 +42,13 @@ VCardLine::VCardLine( const QString &identifier )
}
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 )
: d( 0 )
{
mParamMap = line.mParamMap;
@@ -83,13 +85,13 @@ QString VCardLine::identifier() const
}
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() );
}
void VCardLine::setValueBytes( const QByteArray& value )
{
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
@@ -19,24 +19,24 @@
*/
#ifndef VCARDLINE_H
#define VCARDLINE_H
#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <q3valuelist.h>
+#include <q3cstring.h>
#include <qvariant.h>
#include <qmap.h>
#include <qstring.h>
namespace KABC {
class VCardLine
{
public:
- typedef QValueList<VCardLine> List;
+ typedef Q3ValueList<VCardLine> List;
typedef QMap<QString, QStringList> ParamMap;
VCardLine();
VCardLine( const QString &identifier );
VCardLine( const QString &identifier, const QString &value );
VCardLine( const VCardLine& );
@@ -56,13 +56,13 @@ class VCardLine
QString identifier() const;
/**
* 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 );
/**
* Returns the value of this line.
*/
QString valueString() const;
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
@@ -215,13 +215,13 @@ QString VCardParser::createVCards( const VCard::List& list )
if ( hasEncoding ) { // have to encode the data
QByteArray input, output;
input = (*lineIt).valueBytes();
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" ) );
if ( textLine.length() > FOLD_WIDTH ) { // we have to fold the line
for ( uint i = 0; i <= ( textLine.length() / FOLD_WIDTH ); ++i )
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
@@ -649,13 +649,13 @@ VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pi
{
VCardLine line( identifier );
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 );
line.addParameter( "encoding", "b" );
line.addParameter( "type", "image/png" );
}