author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/vcardformatimpl.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/vcardformatimpl.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index 580c28b..2417874 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp @@ -30,2 +30,5 @@ $Id$ #include <qapplication.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> @@ -56,3 +59,3 @@ bool VCardFormatImpl::load( Addressee &addressee, QFile *file ) QByteArray fdata = file->readAll(); - QCString data(fdata.data(), fdata.size()+1); + Q3CString data(fdata.data(), fdata.size()+1); @@ -77,3 +80,3 @@ bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFi - QCString data(file->readAll().data(), file->size()+1); + Q3CString data(file->readAll().data(), file->size()+1); VCardEntity e( data ); @@ -110,3 +113,3 @@ void VCardFormatImpl::save( const Addressee &addressee, QFile *file ) - QCString vcardData = vcards.asString(); + Q3CString vcardData = vcards.asString(); file->writeBlock( (const char*)vcardData, vcardData.length() ); @@ -131,3 +134,3 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) { - QPtrList<ContentLine> contentLines = v->contentLineList(); + Q3PtrList<ContentLine> contentLines = v->contentLineList(); ContentLine *cl; @@ -135,3 +138,3 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) for( cl = contentLines.first(); cl; cl = contentLines.next() ) { - QCString n = cl->name(); + Q3CString n = cl->name(); if ( n.left( 2 ) == "X-" ) { @@ -221,3 +224,3 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) case EntityBirthday: - addressee.setBirthday( readDateValue( cl ) ); + addressee.setBirthday( (QDateTime) readDateValue( cl ) ); break; @@ -532,3 +535,3 @@ int VCardFormatImpl::readAddressParam( ContentLine *cl ) ParamListIterator it( params ); - QCString tmpStr; + Q3CString tmpStr; for( ; it.current(); ++it ) { @@ -611,3 +614,3 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) ParamListIterator it( params ); - QCString tmpStr; + Q3CString tmpStr; for( ; it.current(); ++it ) { @@ -872,3 +875,3 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty QByteArray data; - QDataStream s( data, IO_WriteOnly ); + QDataStream s( &data, QIODevice::WriteOnly ); s.setVersion( 4 ); // to produce valid png files @@ -961,3 +964,3 @@ void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, co QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_WriteOnly ) ) { + if ( file.open( QIODevice::WriteOnly ) ) { file.writeBlock( data ); @@ -993,3 +996,3 @@ Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee & QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_ReadOnly ) ) { + if ( file.open( QIODevice::ReadOnly ) ) { data = file.readAll(); |