summaryrefslogtreecommitdiffabout
path: root/kabc
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-p1.zip
kdepimpi-p1.tar.gz
kdepimpi-p1.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/address.h6
-rw-r--r--kabc/addressbook.cpp30
-rw-r--r--kabc/addressbook.h4
-rw-r--r--kabc/addressee.cpp2
-rw-r--r--kabc/addressee.h4
-rw-r--r--kabc/addresseedialog.cpp51
-rw-r--r--kabc/addresseedialog.h18
-rw-r--r--kabc/addresseelist.cpp12
-rw-r--r--kabc/addresseelist.h6
-rw-r--r--kabc/addresseeview.cpp47
-rw-r--r--kabc/addresseeview.h4
-rw-r--r--kabc/distributionlist.cpp6
-rw-r--r--kabc/distributionlist.h7
-rw-r--r--kabc/distributionlistdialog.cpp36
-rw-r--r--kabc/distributionlistdialog.h12
-rw-r--r--kabc/distributionlisteditor.cpp30
-rw-r--r--kabc/distributionlisteditor.h10
-rw-r--r--kabc/field.cpp10
-rw-r--r--kabc/field.h4
-rw-r--r--kabc/formatfactory.cpp2
-rw-r--r--kabc/formatfactory.h4
-rw-r--r--kabc/formats/binary/kabcformat_binaryE.pro2
-rw-r--r--kabc/formats/vcardformatplugin2.cpp20
-rw-r--r--kabc/kabc.pro8
-rw-r--r--kabc/kabcE.pro8
-rw-r--r--kabc/key.h6
-rw-r--r--kabc/phonenumber.h6
-rw-r--r--kabc/picture.cpp2
-rw-r--r--kabc/picture.h2
-rw-r--r--kabc/plugins/dir/dir.pro14
-rw-r--r--kabc/plugins/dir/dirE.pro4
-rw-r--r--kabc/plugins/dir/resourcedir.cpp8
-rw-r--r--kabc/plugins/dir/resourcedirconfig.cpp4
-rw-r--r--kabc/plugins/file/file.pro14
-rw-r--r--kabc/plugins/file/fileE.pro4
-rw-r--r--kabc/plugins/file/resourcefile.cpp10
-rw-r--r--kabc/plugins/file/resourcefileconfig.cpp4
-rw-r--r--kabc/plugins/ldap/ldapE.pro4
-rw-r--r--kabc/plugins/olaccess/olaccess.pro8
-rw-r--r--kabc/plugins/opie/opieE.pro6
-rw-r--r--kabc/plugins/qtopia/qtopia.pro16
-rw-r--r--kabc/plugins/qtopia/qtopiaE.pro6
-rw-r--r--kabc/plugins/qtopia/qtopiaconverter.cpp24
-rw-r--r--kabc/plugins/qtopia/qtopiaconverter.h9
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp14
-rw-r--r--kabc/plugins/qtopia/resourceqtopiaconfig.cpp4
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmE.pro8
-rw-r--r--kabc/secrecy.h4
-rw-r--r--kabc/sound.h2
-rw-r--r--kabc/tmpaddressbook.cpp2
-rw-r--r--kabc/vcard/AdrParam.cpp10
-rw-r--r--kabc/vcard/AdrValue.cpp9
-rw-r--r--kabc/vcard/AgentParam.cpp6
-rw-r--r--kabc/vcard/AgentValue.cpp6
-rw-r--r--kabc/vcard/ClassValue.cpp6
-rw-r--r--kabc/vcard/ContentLine.cpp36
-rw-r--r--kabc/vcard/DateParam.cpp6
-rw-r--r--kabc/vcard/DateValue.cpp30
-rw-r--r--kabc/vcard/EmailParam.cpp6
-rw-r--r--kabc/vcard/Entity.cpp12
-rw-r--r--kabc/vcard/Enum.cpp8
-rw-r--r--kabc/vcard/FloatValue.cpp8
-rw-r--r--kabc/vcard/GeoValue.cpp6
-rw-r--r--kabc/vcard/ImageParam.cpp6
-rw-r--r--kabc/vcard/ImageValue.cpp6
-rw-r--r--kabc/vcard/ImgValue.cpp6
-rw-r--r--kabc/vcard/LangValue.cpp24
-rw-r--r--kabc/vcard/NValue.cpp10
-rw-r--r--kabc/vcard/OrgValue.cpp10
-rw-r--r--kabc/vcard/Param.cpp16
-rw-r--r--kabc/vcard/PhoneNumberValue.cpp6
-rw-r--r--kabc/vcard/RToken.cpp6
-rw-r--r--kabc/vcard/SoundValue.cpp6
-rw-r--r--kabc/vcard/SourceParam.cpp6
-rw-r--r--kabc/vcard/TelParam.cpp6
-rw-r--r--kabc/vcard/TelValue.cpp6
-rw-r--r--kabc/vcard/TextBinParam.cpp6
-rw-r--r--kabc/vcard/TextBinValue.cpp6
-rw-r--r--kabc/vcard/TextListValue.cpp10
-rw-r--r--kabc/vcard/TextParam.cpp6
-rw-r--r--kabc/vcard/TextValue.cpp8
-rw-r--r--kabc/vcard/URIValue.cpp16
-rw-r--r--kabc/vcard/UTCValue.cpp6
-rw-r--r--kabc/vcard/VCardEntity.cpp12
-rw-r--r--kabc/vcard/VCardv.cpp33
-rw-r--r--kabc/vcard/Value.cpp6
-rw-r--r--kabc/vcard/include/VCardAdrParam.h16
-rw-r--r--kabc/vcard/include/VCardAdrValue.h46
-rw-r--r--kabc/vcard/include/VCardAgentParam.h4
-rw-r--r--kabc/vcard/include/VCardAgentValue.h2
-rw-r--r--kabc/vcard/include/VCardClassValue.h2
-rw-r--r--kabc/vcard/include/VCardContentLine.h18
-rw-r--r--kabc/vcard/include/VCardDateParam.h2
-rw-r--r--kabc/vcard/include/VCardDateValue.h2
-rw-r--r--kabc/vcard/include/VCardDefines.h6
-rw-r--r--kabc/vcard/include/VCardEmailParam.h8
-rw-r--r--kabc/vcard/include/VCardEntity.h14
-rw-r--r--kabc/vcard/include/VCardEnum.h8
-rw-r--r--kabc/vcard/include/VCardFloatValue.h2
-rw-r--r--kabc/vcard/include/VCardImageParam.h2
-rw-r--r--kabc/vcard/include/VCardImageValue.h2
-rw-r--r--kabc/vcard/include/VCardLangValue.h16
-rw-r--r--kabc/vcard/include/VCardNValue.h26
-rw-r--r--kabc/vcard/include/VCardOrgValue.h8
-rw-r--r--kabc/vcard/include/VCardParam.h22
-rw-r--r--kabc/vcard/include/VCardRToken.h4
-rw-r--r--kabc/vcard/include/VCardSoundValue.h2
-rw-r--r--kabc/vcard/include/VCardSourceParam.h12
-rw-r--r--kabc/vcard/include/VCardTelParam.h6
-rw-r--r--kabc/vcard/include/VCardTelValue.h2
-rw-r--r--kabc/vcard/include/VCardTextBinParam.h2
-rw-r--r--kabc/vcard/include/VCardTextBinValue.h2
-rw-r--r--kabc/vcard/include/VCardTextListValue.h8
-rw-r--r--kabc/vcard/include/VCardTextParam.h2
-rw-r--r--kabc/vcard/include/VCardURIValue.h16
-rw-r--r--kabc/vcard/include/VCardUTCValue.h2
-rw-r--r--kabc/vcard/include/VCardVCard.h18
-rw-r--r--kabc/vcard/include/VCardVCardEntity.h6
-rw-r--r--kabc/vcard/include/VCardValue.h6
-rw-r--r--kabc/vcard/include/generated/AdrParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/AdrValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/AgentParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/AgentValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/ClassValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/ContentLine-generated.h10
-rw-r--r--kabc/vcard/include/generated/DateParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/DateValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/EmailParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/FloatValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/GeoValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/Group-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImageParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImageValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImgParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImgValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/LangValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/NValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/Name-generated.h10
-rw-r--r--kabc/vcard/include/generated/OrgValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/Param-generated.h10
-rw-r--r--kabc/vcard/include/generated/ParamName-generated.h10
-rw-r--r--kabc/vcard/include/generated/ParamValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/PhoneNumberValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/SoundValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/SourceParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TelParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TelValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextBinParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextBinValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextListValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextNSParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/URIValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/UTCValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/VCard-generated.h10
-rw-r--r--kabc/vcard/include/generated/VCardEntity-generated.h10
-rw-r--r--kabc/vcard/include/generated/Value-generated.h10
-rw-r--r--kabc/vcard/testread.cpp12
-rw-r--r--kabc/vcard/testwrite.cpp4
-rw-r--r--kabc/vcard21parser.cpp40
-rw-r--r--kabc/vcard21parser.h10
-rw-r--r--kabc/vcardformatimpl.cpp25
-rw-r--r--kabc/vcardformatplugin.cpp2
-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
169 files changed, 967 insertions, 732 deletions
diff --git a/kabc/address.h b/kabc/address.h
index 38ad20b..41794fe 100644
--- a/kabc/address.h
+++ b/kabc/address.h
@@ -23,25 +23,25 @@ Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_ADDRESS_H 28#ifndef KABC_ADDRESS_H
29#define KABC_ADDRESS_H 29#define KABC_ADDRESS_H
30 30
31#include <qmap.h> 31#include <qmap.h>
32#include <qstring.h> 32#include <qstring.h>
33#include <qregexp.h> 33#include <qregexp.h>
34#include <qstringlist.h> 34#include <qstringlist.h>
35#include <qvaluelist.h> 35#include <q3valuelist.h>
36 36
37// template tags for address formatting localization 37// template tags for address formatting localization
38#define KABC_FMTTAG_realname QString("%n") 38#define KABC_FMTTAG_realname QString("%n")
39#define KABC_FMTTAG_REALNAME QString("%N") 39#define KABC_FMTTAG_REALNAME QString("%N")
40#define KABC_FMTTAG_company QString("%cm") 40#define KABC_FMTTAG_company QString("%cm")
41#define KABC_FMTTAG_COMPANY QString("%CM") 41#define KABC_FMTTAG_COMPANY QString("%CM")
42#define KABC_FMTTAG_pobox QString("%p") 42#define KABC_FMTTAG_pobox QString("%p")
43#define KABC_FMTTAG_street QString("%s") 43#define KABC_FMTTAG_street QString("%s")
44#define KABC_FMTTAG_STREET QString("%S") 44#define KABC_FMTTAG_STREET QString("%S")
45#define KABC_FMTTAG_zipcode QString("%z") 45#define KABC_FMTTAG_zipcode QString("%z")
46#define KABC_FMTTAG_location QString("%l") 46#define KABC_FMTTAG_location QString("%l")
47#define KABC_FMTTAG_LOCATION QString("%L") 47#define KABC_FMTTAG_LOCATION QString("%L")
@@ -59,26 +59,26 @@ namespace KABC {
59 59
60 This class represents information about a postal address. 60 This class represents information about a postal address.
61*/ 61*/
62class Address 62class Address
63{ 63{
64 friend QDataStream &operator<<( QDataStream &, const Address & ); 64 friend QDataStream &operator<<( QDataStream &, const Address & );
65 friend QDataStream &operator>>( QDataStream &, Address & ); 65 friend QDataStream &operator>>( QDataStream &, Address & );
66 66
67 public: 67 public:
68 /** 68 /**
69 List of addresses. 69 List of addresses.
70 */ 70 */
71 typedef QValueList<Address> List; 71 typedef Q3ValueList<Address> List;
72 typedef QValueList<int> TypeList; 72 typedef Q3ValueList<int> TypeList;
73 73
74 /** 74 /**
75 Address types: 75 Address types:
76 76
77 @li @p Dom - domestic 77 @li @p Dom - domestic
78 @li @p Intl - international 78 @li @p Intl - international
79 @li @p Postal - postal 79 @li @p Postal - postal
80 @li @p Parcel - parcel 80 @li @p Parcel - parcel
81 @li @p Home - home address 81 @li @p Home - home address
82 @li @p Work - address at work 82 @li @p Work - address at work
83 @li @p Pref - preferred address 83 @li @p Pref - preferred address
84 */ 84 */
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index fe59fcb..c700897 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -28,26 +28,26 @@ $Id$
28/*US 28/*US
29 29
30#include <qfile.h> 30#include <qfile.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qtimer.h> 32#include <qtimer.h>
33 33
34#include <kapplication.h> 34#include <kapplication.h>
35#include <kinstance.h> 35#include <kinstance.h>
36#include <kstandarddirs.h> 36#include <kstandarddirs.h>
37 37
38#include "errorhandler.h" 38#include "errorhandler.h"
39*/ 39*/
40#include <qptrlist.h> 40#include <q3ptrlist.h>
41#include <qtextstream.h> 41#include <q3textstream.h>
42#include <qfile.h> 42#include <qfile.h>
43#include <qregexp.h> 43#include <qregexp.h>
44 44
45#include <kglobal.h> 45#include <kglobal.h>
46#include <klocale.h> 46#include <klocale.h>
47#include <kmessagebox.h> 47#include <kmessagebox.h>
48#include <kdebug.h> 48#include <kdebug.h>
49#include <libkcal/syncdefines.h> 49#include <libkcal/syncdefines.h>
50#include <libkdepim/phoneaccess.h> 50#include <libkdepim/phoneaccess.h>
51#include "addressbook.h" 51#include "addressbook.h"
52#include "resource.h" 52#include "resource.h"
53#include "vcardconverter.h" 53#include "vcardconverter.h"
@@ -235,25 +235,25 @@ AddressBook::AddressBook( const QString &config )
235AddressBook::AddressBook( const QString &config, const QString &family ) 235AddressBook::AddressBook( const QString &config, const QString &family )
236{ 236{
237 init(config, family); 237 init(config, family);
238 238
239} 239}
240 240
241// the default family is "contact" 241// the default family is "contact"
242void AddressBook::init(const QString &config, const QString &family ) 242void AddressBook::init(const QString &config, const QString &family )
243{ 243{
244 blockLSEchange = false; 244 blockLSEchange = false;
245 d = new AddressBookData; 245 d = new AddressBookData;
246 QString fami = family; 246 QString fami = family;
247 if (config != 0) { 247 if (!config.isEmpty()) {
248 if ( family == "syncContact" ) { 248 if ( family == "syncContact" ) {
249 qDebug("creating sync config "); 249 qDebug("creating sync config ");
250 fami = "contact"; 250 fami = "contact";
251 KConfig* con = new KConfig( locateLocal("config", "syncContactrc") ); 251 KConfig* con = new KConfig( locateLocal("config", "syncContactrc") );
252 con->setGroup( "General" ); 252 con->setGroup( "General" );
253 con->writeEntry( "ResourceKeys", QString("sync") ); 253 con->writeEntry( "ResourceKeys", QString("sync") );
254 con->writeEntry( "Standard", QString("sync") ); 254 con->writeEntry( "Standard", QString("sync") );
255 con->setGroup( "Resource_sync" ); 255 con->setGroup( "Resource_sync" );
256 con->writeEntry( "FileName", config ); 256 con->writeEntry( "FileName", config );
257 con->writeEntry( "FileFormat", QString("vcard") ); 257 con->writeEntry( "FileFormat", QString("vcard") );
258 con->writeEntry( "ResourceIdentifier", QString("sync") ); 258 con->writeEntry( "ResourceIdentifier", QString("sync") );
259 con->writeEntry( "ResourceName", QString("sync_res") ); 259 con->writeEntry( "ResourceName", QString("sync_res") );
@@ -372,31 +372,31 @@ bool AddressBook::save( Ticket *ticket )
372 if ( ticket->resource() ) { 372 if ( ticket->resource() ) {
373 deleteRemovedAddressees(); 373 deleteRemovedAddressees();
374 return ticket->resource()->save( ticket ); 374 return ticket->resource()->save( ticket );
375 } 375 }
376 376
377 return false; 377 return false;
378} 378}
379// exports all Addressees, which are syncable 379// exports all Addressees, which are syncable
380void AddressBook::export2File( QString fileName, QString resourceName ) 380void AddressBook::export2File( QString fileName, QString resourceName )
381{ 381{
382 382
383 QFile outFile( fileName ); 383 QFile outFile( fileName );
384 if ( !outFile.open( IO_WriteOnly ) ) { 384 if ( !outFile.open( QIODevice::WriteOnly ) ) {
385 QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); 385 QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" );
386 KMessageBox::error( 0, text.arg( fileName ) ); 386 KMessageBox::error( 0, text.arg( fileName ) );
387 return ; 387 return ;
388 } 388 }
389 QTextStream t( &outFile ); 389 Q3TextStream t( &outFile );
390 t.setEncoding( QTextStream::UnicodeUTF8 ); 390 t.setEncoding( Q3TextStream::UnicodeUTF8 );
391 Iterator it; 391 Iterator it;
392 KABC::VCardConverter::Version version; 392 KABC::VCardConverter::Version version;
393 version = KABC::VCardConverter::v3_0; 393 version = KABC::VCardConverter::v3_0;
394 for ( it = begin(); it != end(); ++it ) { 394 for ( it = begin(); it != end(); ++it ) {
395 if ( (*it).resource() ) { 395 if ( (*it).resource() ) {
396 bool include = (*it).resource()->includeInSync(); 396 bool include = (*it).resource()->includeInSync();
397 if ( !resourceName.isEmpty() ) 397 if ( !resourceName.isEmpty() )
398 include = (resourceName == (*it).resource()->resourceName() ); 398 include = (resourceName == (*it).resource()->resourceName() );
399 if ( include ) { 399 if ( include ) {
400 //qDebug(QString ("Exporting resource %1 to file %2").arg( (*it).resource()->resourceName() ).arg( fileName ) ); 400 //qDebug(QString ("Exporting resource %1 to file %2").arg( (*it).resource()->resourceName() ).arg( fileName ) );
401 if ( !(*it).IDStr().isEmpty() ) { 401 if ( !(*it).IDStr().isEmpty() ) {
402 (*it).insertCustom( "KADDRESSBOOK", "X-ExternalID", (*it).IDStr() ); 402 (*it).insertCustom( "KADDRESSBOOK", "X-ExternalID", (*it).IDStr() );
@@ -459,47 +459,47 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName )
459 int sep = vcardnew.find(":", next); 459 int sep = vcardnew.find(":", next);
460 vcard +=vcardnew.mid( start, next - start+3); 460 vcard +=vcardnew.mid( start, next - start+3);
461 start = sep; 461 start = sep;
462 } 462 }
463 vcard += vcardnew.mid( start,vcardnew.length() ); 463 vcard += vcardnew.mid( start,vcardnew.length() );
464 vcard.replace ( QRegExp(";;;") , "" ); 464 vcard.replace ( QRegExp(";;;") , "" );
465 vcard.replace ( QRegExp(";;") , "" ); 465 vcard.replace ( QRegExp(";;") , "" );
466 datastream += vcard; 466 datastream += vcard;
467 467
468 } 468 }
469 469
470 QFile outFile(fileName); 470 QFile outFile(fileName);
471 if ( outFile.open(IO_WriteOnly) ) { 471 if ( outFile.open(QIODevice::WriteOnly) ) {
472 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 472 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
473 QTextStream t( &outFile ); // use a text stream 473 Q3TextStream t( &outFile ); // use a text stream
474 t.setEncoding( QTextStream::UnicodeUTF8 ); 474 t.setEncoding( Q3TextStream::UnicodeUTF8 );
475 t <<datastream; 475 t <<datastream;
476 t << "\r\n\r\n"; 476 t << "\r\n\r\n";
477 outFile.close(); 477 outFile.close();
478 478
479 } else { 479 } else {
480 qDebug("Error open temp file "); 480 qDebug("Error open temp file ");
481 return false; 481 return false;
482 } 482 }
483 return true; 483 return true;
484 484
485} 485}
486int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld, QString resource ) 486int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld, QString resource )
487{ 487{
488 488
489 if ( removeOld ) 489 if ( removeOld )
490 setUntagged( true, resource ); 490 setUntagged( true, resource );
491 KABC::Addressee::List list; 491 KABC::Addressee::List list;
492 QFile file( fileName ); 492 QFile file( fileName );
493 file.open( IO_ReadOnly ); 493 file.open( QIODevice::ReadOnly );
494 QByteArray rawData = file.readAll(); 494 QByteArray rawData = file.readAll();
495 file.close(); 495 file.close();
496 QString data; 496 QString data;
497 if ( replaceLabel ) { 497 if ( replaceLabel ) {
498 data = QString::fromLatin1( rawData.data(), rawData.size() + 1 ); 498 data = QString::fromLatin1( rawData.data(), rawData.size() + 1 );
499 data.replace ( QRegExp("LABEL") , "ADR" ); 499 data.replace ( QRegExp("LABEL") , "ADR" );
500 data.replace ( QRegExp("CHARSET=ISO-8859-1") , "" ); 500 data.replace ( QRegExp("CHARSET=ISO-8859-1") , "" );
501 } else 501 } else
502 data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); 502 data = QString::fromUtf8( rawData.data(), rawData.size() + 1 );
503 KABC::VCardTool tool; 503 KABC::VCardTool tool;
504 list = tool.parseVCards( data ); 504 list = tool.parseVCards( data );
505 KABC::Addressee::List::Iterator it; 505 KABC::Addressee::List::Iterator it;
@@ -625,25 +625,25 @@ void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync )
625 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 625 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
626 (*ait).setID( currentSyncDevice,id ); 626 (*ait).setID( currentSyncDevice,id );
627 627
628 } 628 }
629 } 629 }
630} 630}
631void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) 631void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice )
632{ 632{
633 633
634 setUntagged(); 634 setUntagged();
635 KABC::Addressee::List list; 635 KABC::Addressee::List list;
636 QFile file( fileName ); 636 QFile file( fileName );
637 file.open( IO_ReadOnly ); 637 file.open( QIODevice::ReadOnly );
638 QByteArray rawData = file.readAll(); 638 QByteArray rawData = file.readAll();
639 file.close(); 639 file.close();
640 QString data; 640 QString data;
641 641
642 data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); 642 data = QString::fromUtf8( rawData.data(), rawData.size() + 1 );
643 KABC::VCardTool tool; 643 KABC::VCardTool tool;
644 list = tool.parseVCards( data ); 644 list = tool.parseVCards( data );
645 KABC::Addressee::List::Iterator it; 645 KABC::Addressee::List::Iterator it;
646 for ( it = list.begin(); it != list.end(); ++it ) { 646 for ( it = list.begin(); it != list.end(); ++it ) {
647 Iterator ait; 647 Iterator ait;
648 for ( ait = begin(); ait != end(); ++ait ) { 648 for ( ait = begin(); ait != end(); ++ait ) {
649 if ( !(*ait).tagged() ) { 649 if ( !(*ait).tagged() ) {
@@ -1209,49 +1209,49 @@ bool AddressBook::addResource( Resource *resource )
1209 kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl; 1209 kdDebug(5700) << "AddressBook::addResource(): can't add resource" << endl;
1210 return false; 1210 return false;
1211 } 1211 }
1212 1212
1213 resource->setAddressBook( this ); 1213 resource->setAddressBook( this );
1214 1214
1215 d->mManager->add( resource ); 1215 d->mManager->add( resource );
1216 return true; 1216 return true;
1217} 1217}
1218void AddressBook::removeResources() 1218void AddressBook::removeResources()
1219{ 1219{
1220 //remove all possible resources. This should cleanup the configfile. 1220 //remove all possible resources. This should cleanup the configfile.
1221 QPtrList<KABC::Resource> mResources = resources(); 1221 Q3PtrList<KABC::Resource> mResources = resources();
1222 1222
1223 QPtrListIterator<KABC::Resource> it(mResources); 1223 Q3PtrListIterator<KABC::Resource> it(mResources);
1224 for ( ; it.current(); ++it ) { 1224 for ( ; it.current(); ++it ) {
1225 KABC::Resource *res = it.current(); 1225 KABC::Resource *res = it.current();
1226 removeResource(res); 1226 removeResource(res);
1227 } 1227 }
1228} 1228}
1229 1229
1230bool AddressBook::removeResource( Resource *resource ) 1230bool AddressBook::removeResource( Resource *resource )
1231{ 1231{
1232 resource->close(); 1232 resource->close();
1233 1233
1234 if ( resource == standardResource() ) 1234 if ( resource == standardResource() )
1235 d->mManager->setStandardResource( 0 ); 1235 d->mManager->setStandardResource( 0 );
1236 1236
1237 resource->setAddressBook( 0 ); 1237 resource->setAddressBook( 0 );
1238 1238
1239 d->mManager->remove( resource ); 1239 d->mManager->remove( resource );
1240 return true; 1240 return true;
1241} 1241}
1242 1242
1243QPtrList<Resource> AddressBook::resources() 1243Q3PtrList<Resource> AddressBook::resources()
1244{ 1244{
1245 QPtrList<Resource> list; 1245 Q3PtrList<Resource> list;
1246 1246
1247// qDebug("AddressBook::resources() 1"); 1247// qDebug("AddressBook::resources() 1");
1248 1248
1249 KRES::Manager<Resource>::ActiveIterator it; 1249 KRES::Manager<Resource>::ActiveIterator it;
1250 for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) 1250 for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it )
1251 list.append( *it ); 1251 list.append( *it );
1252 1252
1253 return list; 1253 return list;
1254} 1254}
1255 1255
1256/*US 1256/*US
1257void AddressBook::setErrorHandler( ErrorHandler *handler ) 1257void AddressBook::setErrorHandler( ErrorHandler *handler )
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index a8a9fc1..56fce4d 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -22,25 +22,25 @@
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_ADDRESSBOOK_H 28#ifndef KABC_ADDRESSBOOK_H
29#define KABC_ADDRESSBOOK_H 29#define KABC_ADDRESSBOOK_H
30 30
31#include <qobject.h> 31#include <qobject.h>
32 32
33#include <kresources/manager.h> 33#include <kresources/manager.h>
34#include <qptrlist.h> 34#include <q3ptrlist.h>
35 35
36#include "addressee.h" 36#include "addressee.h"
37#include "field.h" 37#include "field.h"
38 38
39namespace KABC { 39namespace KABC {
40 40
41class ErrorHandler; 41class ErrorHandler;
42class Resource; 42class Resource;
43class Ticket; 43class Ticket;
44 44
45/** 45/**
46 @short Address Book 46 @short Address Book
@@ -271,25 +271,25 @@ class AddressBook : public QObject
271 */ 271 */
272 bool addResource( Resource * ); 272 bool addResource( Resource * );
273 273
274 /** 274 /**
275 Remove address book resource. 275 Remove address book resource.
276 */ 276 */
277 void removeResources(); 277 void removeResources();
278 bool removeResource( Resource * ); 278 bool removeResource( Resource * );
279 279
280 /** 280 /**
281 Return pointer list of all resources. 281 Return pointer list of all resources.
282 */ 282 */
283 QPtrList<Resource> resources(); 283 Q3PtrList<Resource> resources();
284 284
285 /** 285 /**
286 Set the @p ErrorHandler, that is used by @ref error() to 286 Set the @p ErrorHandler, that is used by @ref error() to
287 provide gui-independend error messages. 287 provide gui-independend error messages.
288 */ 288 */
289 void setErrorHandler( ErrorHandler * ); 289 void setErrorHandler( ErrorHandler * );
290 290
291 /** 291 /**
292 Shows gui independend error messages. 292 Shows gui independend error messages.
293 */ 293 */
294 void error( const QString& ); 294 void error( const QString& );
295 295
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index e8e440c..9994e29 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -382,25 +382,25 @@ void Addressee::mergeOLContact( const Addressee& ad )
382 382
383void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) 383void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false)
384{ 384{
385 // merge all standard non-outlook fields. 385 // merge all standard non-outlook fields.
386 //if isSubSet (e.g. mobile phone sync) merge all fields 386 //if isSubSet (e.g. mobile phone sync) merge all fields
387 387
388 detach(); 388 detach();
389 if ( isSubSet ) { 389 if ( isSubSet ) {
390 if ( mData->name.isEmpty() ) mData->name = ad.mData->name; 390 if ( mData->name.isEmpty() ) mData->name = ad.mData->name;
391 if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; 391 if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName;
392 if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; 392 if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName;
393 if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; 393 if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ;
394 if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; 394 if ( mData->additionalName.isEmpty() ) mData->additionalName = ad.mData->additionalName;
395 if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; 395 if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix;
396 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; 396 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix;
397 if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; 397 if ( mData->title .isEmpty() ) mData->title = ad.mData->title ;
398 if ( mData->role.isEmpty() ) mData->role = ad.mData->role ; 398 if ( mData->role.isEmpty() ) mData->role = ad.mData->role ;
399 if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; 399 if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName;
400 if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ; 400 if ( mData->organization.isEmpty() ) mData->organization = ad.mData->organization ;
401 if ( mData->note.isEmpty() ) mData->note = ad.mData->note ; 401 if ( mData->note.isEmpty() ) mData->note = ad.mData->note ;
402 if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy; 402 if ( !mData->secrecy.isValid() ) mData->secrecy = ad.mData->secrecy;
403 if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ; 403 if ( ( !mData->url.isValid() && ad.mData->url.isValid() ) ) mData->url = ad.mData->url ;
404 if ( !mData->birthday.isValid() ) 404 if ( !mData->birthday.isValid() )
405 if ( ad.mData->birthday.isValid()) 405 if ( ad.mData->birthday.isValid())
406 mData->birthday = ad.mData->birthday; 406 mData->birthday = ad.mData->birthday;
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 0ea1803..30dcd5d 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -24,25 +24,25 @@ Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef KABC_ADDRESSEE_H 29#ifndef KABC_ADDRESSEE_H
30#define KABC_ADDRESSEE_H 30#define KABC_ADDRESSEE_H
31 31
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qstring.h> 33#include <qstring.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <qvaluelist.h> 36#include <q3valuelist.h>
37 37
38#include <ksharedptr.h> 38#include <ksharedptr.h>
39#include <kurl.h> 39#include <kurl.h>
40 40
41#include "address.h" 41#include "address.h"
42#include "agent.h" 42#include "agent.h"
43#include "geo.h" 43#include "geo.h"
44#include "key.h" 44#include "key.h"
45#include "phonenumber.h" 45#include "phonenumber.h"
46#include "picture.h" 46#include "picture.h"
47#include "secrecy.h" 47#include "secrecy.h"
48#include "sound.h" 48#include "sound.h"
@@ -75,25 +75,25 @@ class Resource;
75 otherwise it constucts the name from the name fields. As fallback, if 75 otherwise it constucts the name from the name fields. As fallback, if
76 nothing else is set it uses name(). 76 nothing else is set it uses name().
77 77
78 name() is the NAME type of RFC2426. It can be used as internal name for the 78 name() is the NAME type of RFC2426. It can be used as internal name for the
79 data enty, but shouldn't be used for displaying the data to the user. 79 data enty, but shouldn't be used for displaying the data to the user.
80 */ 80 */
81class Addressee 81class Addressee
82{ 82{
83 friend QDataStream &operator<<( QDataStream &, const Addressee & ); 83 friend QDataStream &operator<<( QDataStream &, const Addressee & );
84 friend QDataStream &operator>>( QDataStream &, Addressee & ); 84 friend QDataStream &operator>>( QDataStream &, Addressee & );
85 85
86 public: 86 public:
87 typedef QValueList<Addressee> List; 87 typedef Q3ValueList<Addressee> List;
88 88
89 /** 89 /**
90 Construct an empty address book entry. 90 Construct an empty address book entry.
91 */ 91 */
92 Addressee(); 92 Addressee();
93 ~Addressee(); 93 ~Addressee();
94 94
95 Addressee( const Addressee & ); 95 Addressee( const Addressee & );
96 Addressee &operator=( const Addressee & ); 96 Addressee &operator=( const Addressee & );
97 97
98 bool operator==( const Addressee & ) const; 98 bool operator==( const Addressee & ) const;
99 bool operator!=( const Addressee & ) const; 99 bool operator!=( const Addressee & ) const;
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index 671787e..bda1b9e 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -11,44 +11,47 @@
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qlayout.h> 21#include <qlayout.h>
22#include <qpushbutton.h> 22#include <qpushbutton.h>
23#include <qgroupbox.h> 23#include <q3groupbox.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qregexp.h> 25#include <qregexp.h>
26#include <qvbox.h> 26#include <q3vbox.h>
27#include <qlabel.h> 27#include <qlabel.h>
28//Added by qt3to4:
29#include <Q3ValueList>
30#include <Q3VBoxLayout>
28 31
29#include <klocale.h> 32#include <klocale.h>
30#include <kdebug.h> 33#include <kdebug.h>
31#include <kglobalsettings.h> 34#include <kglobalsettings.h>
32 35
33#include "stdaddressbook.h" 36#include "stdaddressbook.h"
34 37
35#include "addresseedialog.h" 38#include "addresseedialog.h"
36#include "KDGanttMinimizeSplitter.h" 39#include "KDGanttMinimizeSplitter.h"
37//#include "addresseedialog.moc" 40//#include "addresseedialog.moc"
38 41
39using namespace KABC; 42using namespace KABC;
40 43
41AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : 44AddresseeItem::AddresseeItem( Q3ListView *parent, const Addressee &addressee ) :
42 QListViewItem( parent ), 45 Q3ListViewItem( parent ),
43 mAddressee( addressee ) 46 mAddressee( addressee )
44{ 47{
45 setText( Name,addressee.realName()); 48 setText( Name,addressee.realName());
46 setText( Email, addressee.preferredEmail() ); 49 setText( Email, addressee.preferredEmail() );
47 setText( Category, addressee.categories().join(";") ); 50 setText( Category, addressee.categories().join(";") );
48} 51}
49 52
50QString AddresseeItem::key( int column, bool ) const 53QString AddresseeItem::key( int column, bool ) const
51{ 54{
52 55
53 if (column == Email) { 56 if (column == Email) {
54 QString value = text(Email); 57 QString value = text(Email);
@@ -62,80 +65,80 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
62 KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), 65 KDialogBase( KDialogBase::Plain, i18n("Select Addressee"),
63 Ok|Cancel, No, parent ), mMultiple( multiple ) 66 Ok|Cancel, No, parent ), mMultiple( multiple )
64{ 67{
65 qDebug("NEW AddresseeDialog "); 68 qDebug("NEW AddresseeDialog ");
66 69
67 70
68 KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this ); 71 KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this );
69 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 72 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
70 setMainWidget( mMiniSplitter ); 73 setMainWidget( mMiniSplitter );
71 74
72 QWidget *listWidget = new QWidget( mMiniSplitter ); 75 QWidget *listWidget = new QWidget( mMiniSplitter );
73 76
74 QVBoxLayout *listLayout = new QVBoxLayout (listWidget) ; 77 Q3VBoxLayout *listLayout = new Q3VBoxLayout (listWidget) ;
75 //topLayout->addLayout( listLayout ); 78 //topLayout->addLayout( listLayout );
76 79
77 mAddresseeList = new KListView( listWidget ); 80 mAddresseeList = new KListView( listWidget );
78 mAddresseeList->addColumn( i18n("Name") ); 81 mAddresseeList->addColumn( i18n("Name") );
79 mAddresseeList->addColumn( i18n("Email") ); 82 mAddresseeList->addColumn( i18n("Email") );
80 mAddresseeList->addColumn( i18n("Category") ); 83 mAddresseeList->addColumn( i18n("Category") );
81 mAddresseeList->setAllColumnsShowFocus( true ); 84 mAddresseeList->setAllColumnsShowFocus( true );
82 mAddresseeList->setFullWidth( true ); 85 mAddresseeList->setFullWidth( true );
83 listLayout->addWidget( mAddresseeList ); 86 listLayout->addWidget( mAddresseeList );
84 connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), 87 connect( mAddresseeList, SIGNAL( doubleClicked( Q3ListViewItem * ) ),
85 SLOT( slotOk() ) ); 88 SLOT( slotOk() ) );
86 //QHBox* searchBox = new QHBox ( listWidget ); 89 //QHBox* searchBox = new QHBox ( listWidget );
87 QHBox * hb = new QHBox ( listWidget ); 90 Q3HBox * hb = new Q3HBox ( listWidget );
88 listLayout->addWidget ( hb ); 91 listLayout->addWidget ( hb );
89 mAddresseeEdit = new QLineEdit( hb ); 92 mAddresseeEdit = new QLineEdit( hb );
90 connect( mAddresseeEdit, SIGNAL( returnPressed() ), 93 connect( mAddresseeEdit, SIGNAL( returnPressed() ),
91 SLOT( loadAddressBook() ) ); 94 SLOT( loadAddressBook() ) );
92 mAddresseeEdit->setFocus(); 95 mAddresseeEdit->setFocus();
93 QPushButton *searchButton = new QPushButton( i18n("Search!"), hb ); 96 QPushButton *searchButton = new QPushButton( i18n("Search!"), hb );
94 connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) ); 97 connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) );
95 if ( mMultiple ) { 98 if ( mMultiple ) {
96 99
97 mSelectedList = new KListView( mMiniSplitter ); 100 mSelectedList = new KListView( mMiniSplitter );
98 mSelectedList->addColumn( i18n("Selected Name") ); 101 mSelectedList->addColumn( i18n("Selected Name") );
99 mSelectedList->addColumn( i18n("Email") ); 102 mSelectedList->addColumn( i18n("Email") );
100 mSelectedList->setAllColumnsShowFocus( true ); 103 mSelectedList->setAllColumnsShowFocus( true );
101 mSelectedList->setFullWidth( true ); 104 mSelectedList->setFullWidth( true );
102 //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), 105 //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ),
103 // SLOT( removeSelected() ) ); 106 // SLOT( removeSelected() ) );
104 connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ), 107 connect( mSelectedList, SIGNAL( clicked( Q3ListViewItem * ) ),
105 SLOT( removeSelected() ) ); 108 SLOT( removeSelected() ) );
106 connect( mSelectedList, SIGNAL( returnPressed( QListViewItem *) ), 109 connect( mSelectedList, SIGNAL( returnPressed( Q3ListViewItem *) ),
107 SLOT( removeSelected() ) ); 110 SLOT( removeSelected() ) );
108 111
109#if 0 112#if 0
110 QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup ); 113 QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup );
111 connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) ); 114 connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) );
112 115
113#endif 116#endif
114 connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), 117 connect( mAddresseeList, SIGNAL( clicked( Q3ListViewItem * ) ),
115 SLOT( addSelected( QListViewItem * ) ) ); 118 SLOT( addSelected( Q3ListViewItem * ) ) );
116 connect( mAddresseeList, SIGNAL( returnPressed( QListViewItem * ) ), 119 connect( mAddresseeList, SIGNAL( returnPressed( Q3ListViewItem * ) ),
117 SLOT( selectNextItem( QListViewItem * ) ) ); 120 SLOT( selectNextItem( Q3ListViewItem * ) ) );
118 121
119 } 122 }
120 123
121 mAddressBook = StdAddressBook::self( true ); 124 mAddressBook = StdAddressBook::self( true );
122 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), 125 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ),
123 SLOT( addressBookChanged() ) ); 126 SLOT( addressBookChanged() ) );
124#if 0 127#if 0
125 connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ), 128 connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ),
126 SLOT( addressBookChanged() ) ); 129 SLOT( addressBookChanged() ) );
127#endif 130#endif
128 loadAddressBook(); 131 loadAddressBook();
129 QValueList<int> splitterSize; 132 Q3ValueList<int> splitterSize;
130 splitterSize.append( ( width() / 5 ) * 3 ); 133 splitterSize.append( ( width() / 5 ) * 3 );
131 splitterSize.append( ( width() / 5 ) *2 ); 134 splitterSize.append( ( width() / 5 ) *2 );
132 mMiniSplitter->setSizes( splitterSize ); 135 mMiniSplitter->setSizes( splitterSize );
133} 136}
134 137
135AddresseeDialog::~AddresseeDialog() 138AddresseeDialog::~AddresseeDialog()
136{ 139{
137 qDebug("DELETE AddresseeDialog "); 140 qDebug("DELETE AddresseeDialog ");
138} 141}
139 142
140void AddresseeDialog::loadAddressBook() 143void AddresseeDialog::loadAddressBook()
141{ 144{
@@ -163,82 +166,82 @@ void AddresseeDialog::loadAddressBook()
163 QString name = (*it).realName(); 166 QString name = (*it).realName();
164 name += (*it).preferredEmail(); 167 name += (*it).preferredEmail();
165 name += (*it).categories().join(";"); 168 name += (*it).categories().join(";");
166#if QT_VERSION >= 0x030000 169#if QT_VERSION >= 0x030000
167 if (re.search(name) != -1) 170 if (re.search(name) != -1)
168#else 171#else
169 if (re.match(name) != -1) 172 if (re.match(name) != -1)
170#endif 173#endif
171 AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); 174 AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) );
172 } 175 }
173} 176}
174 177
175void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item ) 178void AddresseeDialog::addCompletionItem( const QString &str, Q3ListViewItem *item )
176{ 179{
177 if ( str.isEmpty() ) return; 180 if ( str.isEmpty() ) return;
178 181
179 mItemDict.insert( str, item ); 182 mItemDict.insert( str, item );
180 //mAddresseeEdit->completionObject()->addItem( str ); 183 //mAddresseeEdit->completionObject()->addItem( str );
181} 184}
182 185
183void AddresseeDialog::selectItem( const QString &str ) 186void AddresseeDialog::selectItem( const QString &str )
184{ 187{
185 if ( str.isEmpty() ) return; 188 if ( str.isEmpty() ) return;
186 189
187 QListViewItem *item = mItemDict.find( str ); 190 Q3ListViewItem *item = mItemDict.find( str );
188 if ( item ) { 191 if ( item ) {
189 mAddresseeList->blockSignals( true ); 192 mAddresseeList->blockSignals( true );
190 mAddresseeList->setSelected( item, true ); 193 mAddresseeList->setSelected( item, true );
191 mAddresseeList->ensureItemVisible( item ); 194 mAddresseeList->ensureItemVisible( item );
192 mAddresseeList->blockSignals( false ); 195 mAddresseeList->blockSignals( false );
193 } 196 }
194} 197}
195 198
196void AddresseeDialog::updateEdit( QListViewItem *item ) 199void AddresseeDialog::updateEdit( Q3ListViewItem *item )
197{ 200{
198 mAddresseeEdit->setText( item->text( 0 ) ); 201 mAddresseeEdit->setText( item->text( 0 ) );
199 mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); 202 mAddresseeEdit->setSelection( 0, item->text( 0 ).length() );
200} 203}
201 204
202void AddresseeDialog::selectNextItem( QListViewItem *item ) 205void AddresseeDialog::selectNextItem( Q3ListViewItem *item )
203{ 206{
204 addSelected( item ); 207 addSelected( item );
205 QListViewItem *next = item->nextSibling(); 208 Q3ListViewItem *next = item->nextSibling();
206 if ( next ) { 209 if ( next ) {
207 next->setSelected( true ); 210 next->setSelected( true );
208 item->setSelected( false ); 211 item->setSelected( false );
209 mAddresseeList->setCurrentItem( next ); 212 mAddresseeList->setCurrentItem( next );
210 } 213 }
211} 214}
212void AddresseeDialog::addSelected( QListViewItem *item ) 215void AddresseeDialog::addSelected( Q3ListViewItem *item )
213{ 216{
214 AddresseeItem *addrItem = (AddresseeItem *)( item ); 217 AddresseeItem *addrItem = (AddresseeItem *)( item );
215 if ( !addrItem ) return; 218 if ( !addrItem ) return;
216 219
217 Addressee a = addrItem->addressee(); 220 Addressee a = addrItem->addressee();
218 221
219 QListViewItem *selectedItem = mSelectedDict.find( a.uid() ); 222 Q3ListViewItem *selectedItem = mSelectedDict.find( a.uid() );
220 if ( !selectedItem ) { 223 if ( !selectedItem ) {
221 selectedItem = new AddresseeItem( mSelectedList, a ); 224 selectedItem = new AddresseeItem( mSelectedList, a );
222 mSelectedDict.insert( a.uid(), selectedItem ); 225 mSelectedDict.insert( a.uid(), selectedItem );
223 } 226 }
224 227
225} 228}
226 229
227void AddresseeDialog::removeSelected() 230void AddresseeDialog::removeSelected()
228{ 231{
229 QListViewItem *item = mSelectedList->selectedItem(); 232 Q3ListViewItem *item = mSelectedList->selectedItem();
230 AddresseeItem *addrItem = (AddresseeItem *)( item ); 233 AddresseeItem *addrItem = (AddresseeItem *)( item );
231 if ( !addrItem ) return; 234 if ( !addrItem ) return;
232 QListViewItem *next = item->nextSibling(); 235 Q3ListViewItem *next = item->nextSibling();
233 mSelectedDict.remove( addrItem->addressee().uid() ); 236 mSelectedDict.remove( addrItem->addressee().uid() );
234 delete addrItem; 237 delete addrItem;
235 if ( next ) 238 if ( next )
236 next->setSelected( true ); 239 next->setSelected( true );
237} 240}
238 241
239Addressee AddresseeDialog::addressee() 242Addressee AddresseeDialog::addressee()
240{ 243{
241 AddresseeItem *aItem = 0; 244 AddresseeItem *aItem = 0;
242 245
243 if ( mMultiple ) 246 if ( mMultiple )
244 aItem = (AddresseeItem *)( mSelectedList->firstChild() ); 247 aItem = (AddresseeItem *)( mSelectedList->firstChild() );
@@ -246,25 +249,25 @@ Addressee AddresseeDialog::addressee()
246 aItem = (AddresseeItem *)( mAddresseeList->selectedItem() ); 249 aItem = (AddresseeItem *)( mAddresseeList->selectedItem() );
247 250
248 if (aItem) return aItem->addressee(); 251 if (aItem) return aItem->addressee();
249 return Addressee(); 252 return Addressee();
250} 253}
251 254
252Addressee::List AddresseeDialog::addressees() 255Addressee::List AddresseeDialog::addressees()
253{ 256{
254 Addressee::List al; 257 Addressee::List al;
255 AddresseeItem *aItem = 0; 258 AddresseeItem *aItem = 0;
256 259
257 if ( mMultiple ) { 260 if ( mMultiple ) {
258 QListViewItem *item = mSelectedList->firstChild(); 261 Q3ListViewItem *item = mSelectedList->firstChild();
259 while( item ) { 262 while( item ) {
260 aItem = (AddresseeItem *)( item ); 263 aItem = (AddresseeItem *)( item );
261 if ( aItem ) al.append( aItem->addressee() ); 264 if ( aItem ) al.append( aItem->addressee() );
262 item = item->nextSibling(); 265 item = item->nextSibling();
263 } 266 }
264 } 267 }
265 else 268 else
266 { 269 {
267 aItem = (AddresseeItem *)( mAddresseeList->selectedItem() ); 270 aItem = (AddresseeItem *)( mAddresseeList->selectedItem() );
268 if (aItem) al.append( aItem->addressee() ); 271 if (aItem) al.append( aItem->addressee() );
269 } 272 }
270 273
diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h
index 6fab62d..be7bbb4 100644
--- a/kabc/addresseedialog.h
+++ b/kabc/addresseedialog.h
@@ -12,55 +12,55 @@
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#ifndef KABC_ADDRESSEEDIALOG_H 21#ifndef KABC_ADDRESSEEDIALOG_H
22#define KABC_ADDRESSEEDIALOG_H 22#define KABC_ADDRESSEEDIALOG_H
23 23
24#include <qdict.h> 24#include <q3dict.h>
25 25
26#include <kdialogbase.h> 26#include <kdialogbase.h>
27#include <klineedit.h> 27#include <klineedit.h>
28#include <klistview.h> 28#include <klistview.h>
29 29
30#include "addressbook.h" 30#include "addressbook.h"
31 31
32namespace KABC { 32namespace KABC {
33 33
34/** 34/**
35 @short Special ListViewItem, that is used by the AddresseeDialog. 35 @short Special ListViewItem, that is used by the AddresseeDialog.
36*/ 36*/
37class AddresseeItem : public QListViewItem 37class AddresseeItem : public Q3ListViewItem
38{ 38{
39 public: 39 public:
40 40
41 /** 41 /**
42 Type of column 42 Type of column
43 @li @p Name - Name in Addressee 43 @li @p Name - Name in Addressee
44 @li @p Email - Email in Addressee 44 @li @p Email - Email in Addressee
45 */ 45 */
46 enum columns { Name = 0, Email = 1,Category = 2 }; 46 enum columns { Name = 0, Email = 1,Category = 2 };
47 47
48 /** 48 /**
49 Constructor. 49 Constructor.
50 50
51 @param parent The parent listview. 51 @param parent The parent listview.
52 @param addressee The associated addressee. 52 @param addressee The associated addressee.
53 */ 53 */
54 AddresseeItem( QListView *parent, const Addressee &addressee ); 54 AddresseeItem( Q3ListView *parent, const Addressee &addressee );
55 55
56 /** 56 /**
57 Returns the addressee. 57 Returns the addressee.
58 */ 58 */
59 Addressee addressee() const { return mAddressee; } 59 Addressee addressee() const { return mAddressee; }
60 60
61 /** 61 /**
62 Method used by QListView to sort the items. 62 Method used by QListView to sort the items.
63 */ 63 */
64 virtual QString key( int column, bool ascending ) const; 64 virtual QString key( int column, bool ascending ) const;
65 65
66 private: 66 private:
@@ -120,42 +120,42 @@ class AddresseeDialog : public KDialogBase
120 120
121 /** 121 /**
122 Select multiple address book entries. 122 Select multiple address book entries.
123 123
124 Open addressee select dialog and return the entries selected by the user. 124 Open addressee select dialog and return the entries selected by the user.
125 If the user doesn't select an entry or presses cancel, the returned 125 If the user doesn't select an entry or presses cancel, the returned
126 addressee list is empty. 126 addressee list is empty.
127 */ 127 */
128 static Addressee::List getAddressees( QWidget *parent ); 128 static Addressee::List getAddressees( QWidget *parent );
129 129
130 private slots: 130 private slots:
131 void selectItem( const QString & ); 131 void selectItem( const QString & );
132 void selectNextItem( QListViewItem *item ); 132 void selectNextItem( Q3ListViewItem *item );
133 void updateEdit( QListViewItem *item ); 133 void updateEdit( Q3ListViewItem *item );
134 void addSelected( QListViewItem *item ); 134 void addSelected( Q3ListViewItem *item );
135 void removeSelected(); 135 void removeSelected();
136 void loadAddressBook(); 136 void loadAddressBook();
137 137
138 protected slots: 138 protected slots:
139 void addressBookChanged(); 139 void addressBookChanged();
140 140
141 private: 141 private:
142 void addCompletionItem( const QString &str, QListViewItem *item ); 142 void addCompletionItem( const QString &str, Q3ListViewItem *item );
143 143
144 bool mMultiple; 144 bool mMultiple;
145 145
146 KListView *mAddresseeList; 146 KListView *mAddresseeList;
147 QLineEdit *mAddresseeEdit; 147 QLineEdit *mAddresseeEdit;
148 148
149 KListView *mSelectedList; 149 KListView *mSelectedList;
150 150
151 AddressBook *mAddressBook; 151 AddressBook *mAddressBook;
152 152
153 QDict<QListViewItem> mItemDict; 153 Q3Dict<Q3ListViewItem> mItemDict;
154 QDict<QListViewItem> mSelectedDict; 154 Q3Dict<Q3ListViewItem> mSelectedDict;
155 155
156 class AddresseeDialogPrivate; 156 class AddresseeDialogPrivate;
157 AddresseeDialogPrivate *d; 157 AddresseeDialogPrivate *d;
158}; 158};
159 159
160} 160}
161#endif 161#endif
diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp
index 097e162..e1ba1ce 100644
--- a/kabc/addresseelist.cpp
+++ b/kabc/addresseelist.cpp
@@ -19,25 +19,27 @@
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#include <kdebug.h> 29#include <kdebug.h>
30//US 30//US
31#include <qtl.h> 31#include <q3tl.h>
32//Added by qt3to4:
33#include <Q3ValueList>
32 34
33 35
34#include "addresseelist.h" 36#include "addresseelist.h"
35#include "field.h" 37#include "field.h"
36 38
37using namespace KABC; 39using namespace KABC;
38 40
39// 41//
40// 42//
41// Traits 43// Traits
42// 44//
43// 45//
@@ -112,44 +114,44 @@ bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 )
112 } else { 114 } else {
113 return given < 0; 115 return given < 0;
114 } 116 }
115} 117}
116 118
117// 119//
118// 120//
119// AddresseeList 121// AddresseeList
120// 122//
121// 123//
122 124
123AddresseeList::AddresseeList() 125AddresseeList::AddresseeList()
124 : QValueList<Addressee>() 126 : Q3ValueList<Addressee>()
125{ 127{
126 mReverseSorting = false; 128 mReverseSorting = false;
127 mActiveSortingCriterion = FormattedName; 129 mActiveSortingCriterion = FormattedName;
128 mActiveSortingField = 0; 130 mActiveSortingField = 0;
129} 131}
130 132
131AddresseeList::~AddresseeList() 133AddresseeList::~AddresseeList()
132{ 134{
133} 135}
134 136
135AddresseeList::AddresseeList( const AddresseeList &l ) 137AddresseeList::AddresseeList( const AddresseeList &l )
136 : QValueList<Addressee>( l ) 138 : Q3ValueList<Addressee>( l )
137{ 139{
138 mReverseSorting = l.reverseSorting(); 140 mReverseSorting = l.reverseSorting();
139 mActiveSortingCriterion = l.sortingCriterion(); 141 mActiveSortingCriterion = l.sortingCriterion();
140} 142}
141 143
142AddresseeList::AddresseeList( const QValueList<Addressee> &l ) 144AddresseeList::AddresseeList( const Q3ValueList<Addressee> &l )
143 : QValueList<Addressee>( l ) 145 : Q3ValueList<Addressee>( l )
144{ 146{
145 mReverseSorting = false; 147 mReverseSorting = false;
146} 148}
147 149
148void AddresseeList::dump() const 150void AddresseeList::dump() const
149{ 151{
150 kdDebug(5700) << "AddresseeList {" << endl; 152 kdDebug(5700) << "AddresseeList {" << endl;
151 kdDebug(5700) << "reverse order: " << ( mReverseSorting ? "true" : "false" ) << endl; 153 kdDebug(5700) << "reverse order: " << ( mReverseSorting ? "true" : "false" ) << endl;
152 154
153 QString crit; 155 QString crit;
154 if ( Uid == mActiveSortingCriterion ) { 156 if ( Uid == mActiveSortingCriterion ) {
155 crit = "Uid"; 157 crit = "Uid";
diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h
index 2df252c..6106804 100644
--- a/kabc/addresseelist.h
+++ b/kabc/addresseelist.h
@@ -20,25 +20,25 @@
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef KABC_ADDRESSEELIST_H 29#ifndef KABC_ADDRESSEELIST_H
30#define KABC_ADDRESSEELIST_H 30#define KABC_ADDRESSEELIST_H
31 31
32#include <qvaluelist.h> 32#include <q3valuelist.h>
33 33
34#include "addressee.h" 34#include "addressee.h"
35 35
36namespace KABC { 36namespace KABC {
37 37
38class Field; 38class Field;
39 39
40/** 40/**
41 * Each trait must implement one static function for equality, one for "less 41 * Each trait must implement one static function for equality, one for "less
42 * than". Class name should be the field name. A trait does not necessarily 42 * than". Class name should be the field name. A trait does not necessarily
43 * have to stick to just one field: a trait sorting by family name can e.g. 43 * have to stick to just one field: a trait sorting by family name can e.g.
44 * sort addressees with equal family name by given name. 44 * sort addressees with equal family name by given name.
@@ -105,31 +105,31 @@ typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterio
105 * create a defined order again. 105 * create a defined order again.
106 * 106 *
107 * Iterator usage is inherited by QValueList and extensively documented 107 * Iterator usage is inherited by QValueList and extensively documented
108 * there. Please remember that the state of an iterator is undefined 108 * there. Please remember that the state of an iterator is undefined
109 * after any sorting operation. 109 * after any sorting operation.
110 * 110 *
111 * For the enumeration Type SortingCriterion, which specifies the 111 * For the enumeration Type SortingCriterion, which specifies the
112 * field by the collection will be sorted, the following values exist: 112 * field by the collection will be sorted, the following values exist:
113 * Uid, Name, FormattedName, FamilyName, GivenName. 113 * Uid, Name, FormattedName, FamilyName, GivenName.
114 * 114 *
115 * @author Jost Schenck jost@schenck.de 115 * @author Jost Schenck jost@schenck.de
116 */ 116 */
117class AddresseeList : public QValueList<Addressee> 117class AddresseeList : public Q3ValueList<Addressee>
118{ 118{
119 public: 119 public:
120 AddresseeList(); 120 AddresseeList();
121 ~AddresseeList(); 121 ~AddresseeList();
122 AddresseeList( const AddresseeList & ); 122 AddresseeList( const AddresseeList & );
123 AddresseeList( const QValueList<Addressee> & ); 123 AddresseeList( const Q3ValueList<Addressee> & );
124 124
125 /** 125 /**
126 * Debug output. 126 * Debug output.
127 */ 127 */
128 void dump() const; 128 void dump() const;
129 129
130 /** 130 /**
131 * Determines the direction of sorting. On change, the list 131 * Determines the direction of sorting. On change, the list
132 * will <em>not</em> automatically be resorted. 132 * will <em>not</em> automatically be resorted.
133 * @param r <tt>true</tt> if sorting should be done reverse, <tt>false</tt> otherwise 133 * @param r <tt>true</tt> if sorting should be done reverse, <tt>false</tt> otherwise
134 */ 134 */
135 void setReverseSorting( bool r = true ) { mReverseSorting = r; } 135 void setReverseSorting( bool r = true ) { mReverseSorting = r; }
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index cde19a1..425e67c 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -18,80 +18,85 @@
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22#include <kabc/address.h> 22#include <kabc/address.h>
23#include <kabc/addressee.h> 23#include <kabc/addressee.h>
24#include <kabc/phonenumber.h> 24#include <kabc/phonenumber.h>
25#include <kglobal.h> 25#include <kglobal.h>
26//US#include <kglobalsettings.h> 26//US#include <kglobalsettings.h>
27#include <kiconloader.h> 27#include <kiconloader.h>
28#include <klocale.h> 28#include <klocale.h>
29//US #include <kstringhandler.h> 29//US #include <kstringhandler.h>
30#include <qscrollview.h> 30#include <q3scrollview.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qvbox.h> 33#include <q3vbox.h>
34#include <qlabel.h> 34#include <qlabel.h>
35#include <qwidget.h> 35#include <qwidget.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qapplication.h> 37#include <qapplication.h>
38#include <qpushbutton.h> 38#include <qpushbutton.h>
39#ifdef DESKTOP_VERSION 39#ifdef DESKTOP_VERSION
40#include <qpaintdevicemetrics.h> 40#include <q3paintdevicemetrics.h>
41#include <qprinter.h> 41#include <qprinter.h>
42#include <qpainter.h> 42#include <qpainter.h>
43#endif 43#endif
44#include <QDesktopWidget>
44 45
45 46
46#include <qstylesheet.h> 47#include <q3stylesheet.h>
48//Added by qt3to4:
49#include <Q3HBoxLayout>
50#include <QPixmap>
51#include <Q3VBoxLayout>
47#include "externalapphandler.h" 52#include "externalapphandler.h"
48#include <kabc/addresseeview.h> 53#include <kabc/addresseeview.h>
49 54
50 55
51//US #ifndef DESKTOP_VERSION 56//US #ifndef DESKTOP_VERSION
52//US #include <qtopia/qcopenvelope_qws.h> 57//US #include <qtopia/qcopenvelope_qws.h>
53//US #include <qpe/qpeapplication.h> 58//US #include <qpe/qpeapplication.h>
54//US #endif 59//US #endif
55 60
56//US static int kphoneInstalled = 0; 61//US static int kphoneInstalled = 0;
57 62
58using namespace KABC; 63using namespace KABC;
59bool AddresseeView::sFullDetailsMode = false; 64bool AddresseeView::sFullDetailsMode = false;
60 65
61AddresseeView::AddresseeView( QWidget *parent, const char *name ) 66AddresseeView::AddresseeView( QWidget *parent, const char *name )
62 : QTextBrowser( parent, name ) 67 : Q3TextBrowser( parent, name )
63 68
64 69
65{ 70{
66//US setWrapPolicy( QTextEdit::AtWordBoundary ); 71//US setWrapPolicy( QTextEdit::AtWordBoundary );
67 setLinkUnderline( false ); 72 setLinkUnderline( false );
68 // setVScrollBarMode( QScrollView::AlwaysOff ); 73 // setVScrollBarMode( QScrollView::AlwaysOff );
69 //setHScrollBarMode( QScrollView::AlwaysOff ); 74 //setHScrollBarMode( QScrollView::AlwaysOff );
70 75
71//US QStyleSheet *sheet = styleSheet(); 76//US QStyleSheet *sheet = styleSheet();
72//US QStyleSheetItem *link = sheet->item( "a" ); 77//US QStyleSheetItem *link = sheet->item( "a" );
73//US link->setColor( KGlobalSettings::linkColor() ); 78//US link->setColor( KGlobalSettings::linkColor() );
74 79
75 80
76} 81}
77void AddresseeView::printMe() 82void AddresseeView::printMe()
78{ 83{
79#ifdef DESKTOP_VERSION 84#ifdef DESKTOP_VERSION
80 QPrinter printer; 85 QPrinter printer;
81 if (!printer.setup() ) 86 if (!printer.setup() )
82 return; 87 return;
83 QPainter p; 88 QPainter p;
84 p.begin ( &printer ); 89 p.begin ( &printer );
85 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 90 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
86 float dx, dy; 91 float dx, dy;
87 int wid = (m.width() * 9)/10; 92 int wid = (m.width() * 9)/10;
88 dx = (float) wid/(float)contentsWidth (); 93 dx = (float) wid/(float)contentsWidth ();
89 dy = (float)(m.height()) / (float)contentsHeight (); 94 dy = (float)(m.height()) / (float)contentsHeight ();
90 float scale; 95 float scale;
91 // scale to fit the width or height of the paper 96 // scale to fit the width or height of the paper
92 if ( dx < dy ) 97 if ( dx < dy )
93 scale = dx; 98 scale = dx;
94 else 99 else
95 scale = dy; 100 scale = dy;
96 p.translate( m.width()/10,0 ); 101 p.translate( m.width()/10,0 );
97 p.scale( scale, scale ); 102 p.scale( scale, scale );
@@ -393,92 +398,92 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
393 QString picString = ""; 398 QString picString = "";
394 KABC::Picture picture = mAddressee.photo(); 399 KABC::Picture picture = mAddressee.photo();
395 if (picture.undefined() ) picture = mAddressee.logo(); 400 if (picture.undefined() ) picture = mAddressee.logo();
396 bool picAvailintern = false; 401 bool picAvailintern = false;
397 bool picAvailUrl = false; 402 bool picAvailUrl = false;
398 if (! picture.undefined() ) { 403 if (! picture.undefined() ) {
399 picAvailintern = (picture.isIntern() && !picture.data().isNull()); 404 picAvailintern = (picture.isIntern() && !picture.data().isNull());
400 picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() ); 405 picAvailUrl = !picture.isIntern() && QFile::exists(picture.url() );
401 } 406 }
402 if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) { 407 if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) {
403 picString = "<img src=\"myimage\" width=\"50\" height=\"70\">"; 408 picString = "<img src=\"myimage\" width=\"50\" height=\"70\">";
404 if ( picAvailintern ) { 409 if ( picAvailintern ) {
405 QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); 410 Q3MimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() );
406 int wid = picture.data().width(); 411 int wid = picture.data().width();
407 int hei = picture.data().height(); 412 int hei = picture.data().height();
408 if ( wid > 128 || hei > 128 ) { 413 if ( wid > 128 || hei > 128 ) {
409 if ( wid > hei ) { 414 if ( wid > hei ) {
410 hei = (hei*128)/wid; 415 hei = (hei*128)/wid;
411 wid = 128; 416 wid = 128;
412 } else { 417 } else {
413 wid = (wid*128)/hei; 418 wid = (wid*128)/hei;
414 hei = 128; 419 hei = 128;
415 } 420 }
416 } 421 }
417 picString = QString("<img src=\"myimage\" width=\"%1\" height=\"%2\">").arg(wid).arg(hei); 422 picString = QString("<img src=\"myimage\" width=\"%1\" height=\"%2\">").arg(wid).arg(hei);
418 } else { 423 } else {
419 if ( picAvailUrl ) { 424 if ( picAvailUrl ) {
420 QPixmap picPix( picture.url() ); 425 QPixmap picPix( picture.url() );
421 QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix ); 426 Q3MimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix );
422 int wid = picPix.width(); 427 int wid = picPix.width();
423 int hei = picPix.height(); 428 int hei = picPix.height();
424 if ( wid > 128 || hei > 128 ) { 429 if ( wid > 128 || hei > 128 ) {
425 if ( wid > hei ) { 430 if ( wid > hei ) {
426 hei = (hei*128)/wid; 431 hei = (hei*128)/wid;
427 wid = 128; 432 wid = 128;
428 } else { 433 } else {
429 wid = (wid*128)/hei; 434 wid = (wid*128)/hei;
430 hei = 128; 435 hei = 128;
431 } 436 }
432 } 437 }
433 picString = QString("<img src=\"myimage\" width=\"%1\" height=\"%2\">").arg(wid).arg(hei); 438 picString = QString("<img src=\"myimage\" width=\"%1\" height=\"%2\">").arg(wid).arg(hei);
434 } else { 439 } else {
435 if ( !mAddressee.custom( "KADDRESSBOOK", "X-Children" ).isEmpty() ) { 440 if ( !mAddressee.custom( "KADDRESSBOOK", "X-Children" ).isEmpty() ) {
436 static bool setDefaultImageChildren = false; 441 static bool setDefaultImageChildren = false;
437 if ( !setDefaultImageChildren ) { 442 if ( !setDefaultImageChildren ) {
438 QMimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) ); 443 Q3MimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) );
439 setDefaultImageChildren = true; 444 setDefaultImageChildren = true;
440 } 445 }
441 picString = "<img src=\"familyIcon\" width=\"64\" height=\"64\">"; 446 picString = "<img src=\"familyIcon\" width=\"64\" height=\"64\">";
442 447
443 } else if ( !mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ).isEmpty() ) { 448 } else if ( !mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ).isEmpty() ) {
444 static bool setDefaultImagepouses = false; 449 static bool setDefaultImagepouses = false;
445 if ( !setDefaultImagepouses ) { 450 if ( !setDefaultImagepouses ) {
446 QMimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) ); 451 Q3MimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) );
447 setDefaultImagepouses = true; 452 setDefaultImagepouses = true;
448 } 453 }
449 picString = "<img src=\"SpousesIcon\" width=\"64\" height=\"64\">"; 454 picString = "<img src=\"SpousesIcon\" width=\"64\" height=\"64\">";
450 } else { 455 } else {
451 QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); 456 QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" );
452 if ( gen == "male" ) { 457 if ( gen == "male" ) {
453 static bool setDefaultImageMale = false; 458 static bool setDefaultImageMale = false;
454 if ( !setDefaultImageMale ) { 459 if ( !setDefaultImageMale ) {
455 QMimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) ); 460 Q3MimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) );
456 setDefaultImageMale = true; 461 setDefaultImageMale = true;
457 } 462 }
458 picString = "<img src=\"MaleIcon\" width=\"64\" height=\"64\">"; 463 picString = "<img src=\"MaleIcon\" width=\"64\" height=\"64\">";
459 464
460 } else if ( gen == "female" ) { 465 } else if ( gen == "female" ) {
461 static bool setDefaultImageFemale = false; 466 static bool setDefaultImageFemale = false;
462 if ( !setDefaultImageFemale ) { 467 if ( !setDefaultImageFemale ) {
463 QMimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) ); 468 Q3MimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) );
464 setDefaultImageFemale = true; 469 setDefaultImageFemale = true;
465 } 470 }
466 picString = "<img src=\"FemaleIcon\" width=\"64\" height=\"64\">"; 471 picString = "<img src=\"FemaleIcon\" width=\"64\" height=\"64\">";
467 472
468 } else { 473 } else {
469 static bool setDefaultImage = false; 474 static bool setDefaultImage = false;
470 if ( !setDefaultImage ) { 475 if ( !setDefaultImage ) {
471 //qDebug("Setting default pixmap "); 476 //qDebug("Setting default pixmap ");
472 QMimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) ); 477 Q3MimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) );
473 setDefaultImage = true; 478 setDefaultImage = true;
474 } 479 }
475 picString = "<img src=\"defaultIcon\" width=\"64\" height=\"64\">"; 480 picString = "<img src=\"defaultIcon\" width=\"64\" height=\"64\">";
476 } 481 }
477 } 482 }
478 } 483 }
479 } 484 }
480 mText = QString::fromLatin1( 485 mText = QString::fromLatin1(
481 "<html>" 486 "<html>"
482 "<body text=\"%1\" bgcolor=\"%2\">" // text and background color 487 "<body text=\"%1\" bgcolor=\"%2\">" // text and background color
483 "<table>" 488 "<table>"
484 "<tr>" 489 "<tr>"
@@ -644,25 +649,25 @@ QString AddresseeView::getPhoneNumbers( KABC::PhoneNumber::List phones_unsorted
644 return dynamicPart; 649 return dynamicPart;
645} 650}
646/* 651/*
647KABC::Addressee AddresseeView::addressee() const 652KABC::Addressee AddresseeView::addressee() const
648{ 653{
649 return mAddressee; 654 return mAddressee;
650} 655}
651*/ 656*/
652void AddresseeView::addTag(const QString & tag,const QString & text) 657void AddresseeView::addTag(const QString & tag,const QString & text)
653{ 658{
654 if ( text.isEmpty() ) 659 if ( text.isEmpty() )
655 return; 660 return;
656 int number=text.contains("\n"); 661 int number=text.count("\n");
657 QString str = "<" + tag + ">"; 662 QString str = "<" + tag + ">";
658 QString tmpText=text; 663 QString tmpText=text;
659 QString tmpStr=str; 664 QString tmpStr=str;
660 if(number !=-1) 665 if(number !=-1)
661 { 666 {
662 if (number > 0) { 667 if (number > 0) {
663 int pos=0; 668 int pos=0;
664 QString tmp; 669 QString tmp;
665 for(int i=0;i<=number;i++) { 670 for(int i=0;i<=number;i++) {
666 pos=tmpText.find("\n"); 671 pos=tmpText.find("\n");
667 tmp=tmpText.left(pos); 672 tmp=tmpText.left(pos);
668 tmpText=tmpText.right(tmpText.length()-pos-1); 673 tmpText=tmpText.right(tmpText.length()-pos-1);
@@ -679,42 +684,42 @@ void AddresseeView::addTag(const QString & tag,const QString & text)
679 mText.append(str); 684 mText.append(str);
680 } 685 }
681} 686}
682 687
683AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bool takeloc, QWidget *parent, const char *name ) : KDialogBase(parent,name, 688AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bool takeloc, QWidget *parent, const char *name ) : KDialogBase(parent,name,
684 true ,i18n("Conflict! Please choose Adressee!"),Ok|User1|Close,Close, false) 689 true ,i18n("Conflict! Please choose Adressee!"),Ok|User1|Close,Close, false)
685{ 690{
686 findButton( Close )->setText( i18n("Cancel Sync")); 691 findButton( Close )->setText( i18n("Cancel Sync"));
687 findButton( Ok )->setText( i18n("Remote")); 692 findButton( Ok )->setText( i18n("Remote"));
688 findButton( User1 )->setText( i18n("Local")); 693 findButton( User1 )->setText( i18n("Local"));
689 QWidget* topframe = new QWidget( this ); 694 QWidget* topframe = new QWidget( this );
690 setMainWidget( topframe ); 695 setMainWidget( topframe );
691 QBoxLayout* bl; 696 Q3BoxLayout* bl;
692 if ( QApplication::desktop()->width() < 640 ) { 697 if ( QApplication::desktop()->width() < 640 ) {
693 bl = new QVBoxLayout( topframe ); 698 bl = new Q3VBoxLayout( topframe );
694 } else { 699 } else {
695 bl = new QHBoxLayout( topframe ); 700 bl = new Q3HBoxLayout( topframe );
696 } 701 }
697 QVBox* subframe = new QVBox( topframe ); 702 Q3VBox* subframe = new Q3VBox( topframe );
698 bl->addWidget(subframe ); 703 bl->addWidget(subframe );
699 QLabel* lab = new QLabel( i18n("Local Addressee"), subframe ); 704 QLabel* lab = new QLabel( i18n("Local Addressee"), subframe );
700 if ( takeloc ) 705 if ( takeloc )
701 lab->setBackgroundColor(Qt::green.light() ); 706 lab->setBackgroundColor(QColor(Qt::green).light() );
702 AddresseeView * av = new AddresseeView( subframe ); 707 AddresseeView * av = new AddresseeView( subframe );
703 av->setAddressee( loc ); 708 av->setAddressee( loc );
704 subframe = new QVBox( topframe ); 709 subframe = new Q3VBox( topframe );
705 bl->addWidget(subframe ); 710 bl->addWidget(subframe );
706 lab = new QLabel( i18n("Remote Addressee"), subframe ); 711 lab = new QLabel( i18n("Remote Addressee"), subframe );
707 if ( !takeloc ) 712 if ( !takeloc )
708 lab->setBackgroundColor(Qt::green.light() ); 713 lab->setBackgroundColor(QColor(Qt::green).light() );
709 av = new AddresseeView( subframe ); 714 av = new AddresseeView( subframe );
710 av->setAddressee( rem ); 715 av->setAddressee( rem );
711 QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote())); 716 QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote()));
712 QObject::connect(this,SIGNAL(user1Clicked()),this, SLOT(slot_local())); 717 QObject::connect(this,SIGNAL(user1Clicked()),this, SLOT(slot_local()));
713#ifndef DESKTOP_VERSION 718#ifndef DESKTOP_VERSION
714 showMaximized(); 719 showMaximized();
715#else 720#else
716 resize ( 640, 400 ); 721 resize ( 640, 400 );
717#endif 722#endif
718} 723}
719 724
720int AddresseeChooser::executeD( bool local ) 725int AddresseeChooser::executeD( bool local )
diff --git a/kabc/addresseeview.h b/kabc/addresseeview.h
index a4de085..f7ce2e0 100644
--- a/kabc/addresseeview.h
+++ b/kabc/addresseeview.h
@@ -17,30 +17,30 @@
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22#ifndef KPIM_ADDRESSEEVIEW_H 22#ifndef KPIM_ADDRESSEEVIEW_H
23#define KPIM_ADDRESSEEVIEW_H 23#define KPIM_ADDRESSEEVIEW_H
24 24
25#include <kabc/addressee.h> 25#include <kabc/addressee.h>
26#include <kdialogbase.h> 26#include <kdialogbase.h>
27 27
28//US #include <ktextbrowser.h> 28//US #include <ktextbrowser.h>
29#include <qtextbrowser.h> 29#include <q3textbrowser.h>
30 30
31namespace KABC { 31namespace KABC {
32 32
33//US class AddresseeView : public KTextBrowser 33//US class AddresseeView : public KTextBrowser
34class AddresseeView : public QTextBrowser 34class AddresseeView : public Q3TextBrowser
35{ 35{
36 36
37 public: 37 public:
38 AddresseeView( QWidget *parent = 0, const char *name = 0 ); 38 AddresseeView( QWidget *parent = 0, const char *name = 0 );
39 39
40 /** 40 /**
41 Sets the addressee object. The addressee is displayed immediately. 41 Sets the addressee object. The addressee is displayed immediately.
42 42
43 @param addr The addressee object. 43 @param addr The addressee object.
44 */ 44 */
45 void setAddressee( const KABC::Addressee& addr ); 45 void setAddressee( const KABC::Addressee& addr );
46 void setSource(const QString& n); 46 void setSource(const QString& n);
diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp
index d34ba0b..cf5afa6 100644
--- a/kabc/distributionlist.cpp
+++ b/kabc/distributionlist.cpp
@@ -14,24 +14,26 @@
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <ksimpleconfig.h> 21#include <ksimpleconfig.h>
22#include <kstandarddirs.h> 22#include <kstandarddirs.h>
23#include <kdebug.h> 23#include <kdebug.h>
24 24
25#include "distributionlist.h" 25#include "distributionlist.h"
26//Added by qt3to4:
27#include <Q3ValueList>
26 28
27using namespace KABC; 29using namespace KABC;
28 30
29DistributionList::DistributionList( DistributionListManager *manager, 31DistributionList::DistributionList( DistributionListManager *manager,
30 const QString &name ) : 32 const QString &name ) :
31 mManager( manager ), mName( name ) 33 mManager( manager ), mName( name )
32{ 34{
33 mManager->insert( this ); 35 mManager->insert( this );
34} 36}
35 37
36DistributionList::~DistributionList() 38DistributionList::~DistributionList()
37{ 39{
@@ -45,45 +47,45 @@ void DistributionList::setName( const QString &name )
45 47
46QString DistributionList::name() const 48QString DistributionList::name() const
47{ 49{
48 return mName; 50 return mName;
49} 51}
50 52
51void DistributionList::insertEntry( const Addressee &a, const QString &email ) 53void DistributionList::insertEntry( const Addressee &a, const QString &email )
52{ 54{
53 QString em = email; 55 QString em = email;
54 if (em.isNull() ) 56 if (em.isNull() )
55 em = a.preferredEmail(); 57 em = a.preferredEmail();
56 Entry e( a, em ); 58 Entry e( a, em );
57 QValueList<Entry>::Iterator it; 59 Q3ValueList<Entry>::Iterator it;
58 for( it = mEntries.begin(); it != mEntries.end(); ++it ) { 60 for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
59 if ( (*it).addressee.uid() == a.uid() ) { 61 if ( (*it).addressee.uid() == a.uid() ) {
60 /** 62 /**
61 We have to check if both email addresses contains no data, 63 We have to check if both email addresses contains no data,
62 a simple 'email1 == email2' wont work here 64 a simple 'email1 == email2' wont work here
63 */ 65 */
64 if ( ( (*it).email.isNull() && em.isEmpty() ) || 66 if ( ( (*it).email.isNull() && em.isEmpty() ) ||
65 ( (*it).email.isEmpty() && em.isNull() ) || 67 ( (*it).email.isEmpty() && em.isNull() ) ||
66 ( (*it).email == em ) ) { 68 ( (*it).email == em ) ) {
67 //*it = e; 69 //*it = e;
68 return; 70 return;
69 } 71 }
70 } 72 }
71 } 73 }
72 mEntries.append( e ); 74 mEntries.append( e );
73} 75}
74 76
75void DistributionList::removeEntry( const Addressee &a, const QString &email ) 77void DistributionList::removeEntry( const Addressee &a, const QString &email )
76{ 78{
77 QValueList<Entry>::Iterator it; 79 Q3ValueList<Entry>::Iterator it;
78 for( it = mEntries.begin(); it != mEntries.end(); ++it ) { 80 for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
79 if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { 81 if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) {
80 mEntries.remove( it ); 82 mEntries.remove( it );
81 return; 83 return;
82 } 84 }
83 } 85 }
84} 86}
85 87
86QStringList DistributionList::emails() const 88QStringList DistributionList::emails() const
87{ 89{
88 QStringList emails; 90 QStringList emails;
89 91
diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h
index c81e543..8d21a17 100644
--- a/kabc/distributionlist.h
+++ b/kabc/distributionlist.h
@@ -15,49 +15,52 @@
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#ifndef KABC_DISTRIBUTIONLIST_H 21#ifndef KABC_DISTRIBUTIONLIST_H
22#define KABC_DISTRIBUTIONLIST_H 22#define KABC_DISTRIBUTIONLIST_H
23 23
24//#include <kdirwatch.h> 24//#include <kdirwatch.h>
25 25
26#include "addressbook.h" 26#include "addressbook.h"
27//Added by qt3to4:
28#include <Q3ValueList>
29#include <Q3PtrList>
27 30
28namespace KABC { 31namespace KABC {
29 32
30class DistributionListManager; 33class DistributionListManager;
31 34
32/** 35/**
33 @short Distribution list of email addresses 36 @short Distribution list of email addresses
34 37
35 This class represents a list of email addresses. Each email address is 38 This class represents a list of email addresses. Each email address is
36 associated with an address book entry. If the address book entry changes, the 39 associated with an address book entry. If the address book entry changes, the
37 entry in the distribution list is automatically updated. 40 entry in the distribution list is automatically updated.
38*/ 41*/
39class DistributionList 42class DistributionList
40{ 43{
41 public: 44 public:
42 /** 45 /**
43 @short Distribution List Entry 46 @short Distribution List Entry
44 47
45 This class represents an entry of a distribution list. It consists of an 48 This class represents an entry of a distribution list. It consists of an
46 addressee and an email address. If the email address is null, the 49 addressee and an email address. If the email address is null, the
47 preferred email address of the addressee is used. 50 preferred email address of the addressee is used.
48 */ 51 */
49 struct Entry 52 struct Entry
50 { 53 {
51 typedef QValueList<Entry> List; 54 typedef Q3ValueList<Entry> List;
52 55
53 Entry() {} 56 Entry() {}
54 Entry( const Addressee &_addressee, const QString &_email ) : 57 Entry( const Addressee &_addressee, const QString &_email ) :
55 addressee( _addressee ), email( _email ) {} 58 addressee( _addressee ), email( _email ) {}
56 59
57 Addressee addressee; 60 Addressee addressee;
58 QString email; 61 QString email;
59 }; 62 };
60 63
61 /** 64 /**
62 Create distribution list object. 65 Create distribution list object.
63 66
@@ -158,25 +161,25 @@ class DistributionListManager
158 Load distribution lists form disk. 161 Load distribution lists form disk.
159 */ 162 */
160 bool load(); 163 bool load();
161 164
162 /** 165 /**
163 Save distribution lists to disk. 166 Save distribution lists to disk.
164 */ 167 */
165 bool save(); 168 bool save();
166 169
167 private: 170 private:
168 AddressBook *mAddressBook; 171 AddressBook *mAddressBook;
169 172
170 QPtrList<DistributionList> mLists; 173 Q3PtrList<DistributionList> mLists;
171}; 174};
172 175
173/** 176/**
174 @short Watchdog for distribution lists 177 @short Watchdog for distribution lists
175 178
176 This class provides a @ref changed() signal that i emitted when the 179 This class provides a @ref changed() signal that i emitted when the
177 distribution lists has changed in some way. 180 distribution lists has changed in some way.
178 181
179 Exapmle: 182 Exapmle:
180 183
181 <pre> 184 <pre>
182 KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self() 185 KABC::DistributionListWatcher *watchdog = KABC::DistributionListWatcher::self()
diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp
index d2e1144..82883e6 100644
--- a/kabc/distributionlistdialog.cpp
+++ b/kabc/distributionlistdialog.cpp
@@ -9,31 +9,37 @@
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qlistview.h> 21#include <q3listview.h>
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26//Added by qt3to4:
27#include <Q3HBoxLayout>
28#include <Q3GridLayout>
29#include <Q3Frame>
30#include <Q3VBoxLayout>
26#include <klineeditdlg.h> 31#include <klineeditdlg.h>
27#include <qbuttongroup.h> 32#include <q3buttongroup.h>
33#include <Q3Button>
28#include <qradiobutton.h> 34#include <qradiobutton.h>
29 35
30#include <klocale.h> 36#include <klocale.h>
31#include <kdebug.h> 37#include <kdebug.h>
32#include <kmessagebox.h> 38#include <kmessagebox.h>
33 39
34#include "addressbook.h" 40#include "addressbook.h"
35#include "addresseedialog.h" 41#include "addresseedialog.h"
36#include "distributionlist.h" 42#include "distributionlist.h"
37 43
38#include "distributionlistdialog.h" 44#include "distributionlistdialog.h"
39 45
@@ -51,66 +57,66 @@ DistributionListDialog::DistributionListDialog( AddressBook *addressBook, QWidge
51} 57}
52 58
53DistributionListDialog::~DistributionListDialog() 59DistributionListDialog::~DistributionListDialog()
54{ 60{
55} 61}
56 62
57 63
58EmailSelector::EmailSelector( const QStringList &emails, const QString &current, 64EmailSelector::EmailSelector( const QStringList &emails, const QString &current,
59 QWidget *parent ) : 65 QWidget *parent ) :
60 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, 66 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
61 parent ) 67 parent )
62{ 68{
63 QFrame *topFrame = plainPage(); 69 Q3Frame *topFrame = plainPage();
64 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 70 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
65 71
66 mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), 72 mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
67 topFrame ); 73 topFrame );
68 topLayout->addWidget( mButtonGroup ); 74 topLayout->addWidget( mButtonGroup );
69 75
70 QStringList::ConstIterator it; 76 QStringList::ConstIterator it;
71 for( it = emails.begin(); it != emails.end(); ++it ) { 77 for( it = emails.begin(); it != emails.end(); ++it ) {
72 QRadioButton *button = new QRadioButton( *it, mButtonGroup ); 78 QRadioButton *button = new QRadioButton( *it, mButtonGroup );
73 if ( (*it) == current ) { 79 if ( (*it) == current ) {
74 button->setDown( true ); 80 button->setDown( true );
75 } 81 }
76 } 82 }
77} 83}
78 84
79QString EmailSelector::selected() 85QString EmailSelector::selected()
80{ 86{
81 QButton *button = mButtonGroup->selected(); 87 QAbstractButton *button = mButtonGroup->selected();
82 if ( button ) return button->text(); 88 if ( button ) return button->text();
83 return QString::null; 89 return QString::null;
84} 90}
85 91
86QString EmailSelector::getEmail( const QStringList &emails, const QString &current, 92QString EmailSelector::getEmail( const QStringList &emails, const QString &current,
87 QWidget *parent ) 93 QWidget *parent )
88{ 94{
89 EmailSelector *dlg = new EmailSelector( emails, current, parent ); 95 EmailSelector *dlg = new EmailSelector( emails, current, parent );
90 dlg->exec(); 96 dlg->exec();
91 97
92 QString result = dlg->selected(); 98 QString result = dlg->selected();
93 99
94 delete dlg; 100 delete dlg;
95 101
96 return result; 102 return result;
97} 103}
98 104
99class EntryItem : public QListViewItem 105class EntryItem : public Q3ListViewItem
100{ 106{
101 public: 107 public:
102 EntryItem( QListView *parent, const Addressee &addressee, 108 EntryItem( Q3ListView *parent, const Addressee &addressee,
103 const QString &email=QString::null ) : 109 const QString &email=QString::null ) :
104 QListViewItem( parent ), 110 Q3ListViewItem( parent ),
105 mAddressee( addressee ), 111 mAddressee( addressee ),
106 mEmail( email ) 112 mEmail( email )
107 { 113 {
108 setText( 0, addressee.realName() ); 114 setText( 0, addressee.realName() );
109 if( email.isEmpty() ) { 115 if( email.isEmpty() ) {
110 setText( 1, addressee.preferredEmail() ); 116 setText( 1, addressee.preferredEmail() );
111 setText( 2, i18n("Yes") ); 117 setText( 2, i18n("Yes") );
112 } else { 118 } else {
113 setText( 1, email ); 119 setText( 1, email );
114 setText( 2, i18n("No") ); 120 setText( 2, i18n("No") );
115 } 121 }
116 } 122 }
@@ -127,70 +133,70 @@ class EntryItem : public QListViewItem
127 133
128 private: 134 private:
129 Addressee mAddressee; 135 Addressee mAddressee;
130 QString mEmail; 136 QString mEmail;
131}; 137};
132 138
133DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, QWidget *parent) : 139DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *addressBook, QWidget *parent) :
134 QWidget( parent ), 140 QWidget( parent ),
135 mAddressBook( addressBook ) 141 mAddressBook( addressBook )
136{ 142{
137 kdDebug(5700) << "DistributionListEditor()" << endl; 143 kdDebug(5700) << "DistributionListEditor()" << endl;
138 144
139 QBoxLayout *topLayout = new QVBoxLayout( this ); 145 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
140 topLayout->setSpacing( KDialog::spacingHint() ); 146 topLayout->setSpacing( KDialog::spacingHint() );
141 147
142 QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; 148 Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ;
143 149
144 mNameCombo = new QComboBox( this ); 150 mNameCombo = new QComboBox( this );
145 nameLayout->addWidget( mNameCombo ); 151 nameLayout->addWidget( mNameCombo );
146 connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) ); 152 connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) );
147 153
148 mNewButton = new QPushButton( i18n("New List..."), this ); 154 mNewButton = new QPushButton( i18n("New List..."), this );
149 nameLayout->addWidget( mNewButton ); 155 nameLayout->addWidget( mNewButton );
150 connect( mNewButton, SIGNAL( clicked() ), SLOT( newList() ) ); 156 connect( mNewButton, SIGNAL( clicked() ), SLOT( newList() ) );
151 157
152 mEditButton = new QPushButton( i18n("Rename List..."), this ); 158 mEditButton = new QPushButton( i18n("Rename List..."), this );
153 nameLayout->addWidget( mEditButton ); 159 nameLayout->addWidget( mEditButton );
154 connect( mEditButton, SIGNAL( clicked() ), SLOT( editList() ) ); 160 connect( mEditButton, SIGNAL( clicked() ), SLOT( editList() ) );
155 161
156 mRemoveButton = new QPushButton( i18n("Remove List"), this ); 162 mRemoveButton = new QPushButton( i18n("Remove List"), this );
157 nameLayout->addWidget( mRemoveButton ); 163 nameLayout->addWidget( mRemoveButton );
158 connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) ); 164 connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) );
159 165
160 QGridLayout *gridLayout = new QGridLayout( topLayout, 3, 3 ); 166 Q3GridLayout *gridLayout = new Q3GridLayout( topLayout, 3, 3 );
161 gridLayout->setColStretch(1, 1); 167 gridLayout->setColStretch(1, 1);
162 168
163 QLabel *listLabel = new QLabel( i18n("Available addresses:"), this ); 169 QLabel *listLabel = new QLabel( i18n("Available addresses:"), this );
164 gridLayout->addWidget( listLabel, 0, 0 ); 170 gridLayout->addWidget( listLabel, 0, 0 );
165 171
166 mListLabel = new QLabel( this ); 172 mListLabel = new QLabel( this );
167 gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); 173 gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 );
168 174
169 mAddresseeView = new QListView( this ); 175 mAddresseeView = new Q3ListView( this );
170 mAddresseeView->addColumn( i18n("Name") ); 176 mAddresseeView->addColumn( i18n("Name") );
171 mAddresseeView->addColumn( i18n("Preferred Email") ); 177 mAddresseeView->addColumn( i18n("Preferred Email") );
172 mAddresseeView->setAllColumnsShowFocus( true ); 178 mAddresseeView->setAllColumnsShowFocus( true );
173 gridLayout->addWidget( mAddresseeView, 1, 0 ); 179 gridLayout->addWidget( mAddresseeView, 1, 0 );
174 connect( mAddresseeView, SIGNAL( selectionChanged() ), 180 connect( mAddresseeView, SIGNAL( selectionChanged() ),
175 SLOT( slotSelectionAddresseeViewChanged() ) ); 181 SLOT( slotSelectionAddresseeViewChanged() ) );
176 connect( mAddresseeView, SIGNAL( doubleClicked( QListViewItem * ) ), 182 connect( mAddresseeView, SIGNAL( doubleClicked( Q3ListViewItem * ) ),
177 SLOT( addEntry() ) ); 183 SLOT( addEntry() ) );
178 184
179 mAddEntryButton = new QPushButton( i18n("Add Entry"), this ); 185 mAddEntryButton = new QPushButton( i18n("Add Entry"), this );
180 mAddEntryButton->setEnabled(false); 186 mAddEntryButton->setEnabled(false);
181 gridLayout->addWidget( mAddEntryButton, 2, 0 ); 187 gridLayout->addWidget( mAddEntryButton, 2, 0 );
182 connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); 188 connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
183 189
184 mEntryView = new QListView( this ); 190 mEntryView = new Q3ListView( this );
185 mEntryView->addColumn( i18n("Name") ); 191 mEntryView->addColumn( i18n("Name") );
186 mEntryView->addColumn( i18n("Email") ); 192 mEntryView->addColumn( i18n("Email") );
187 mEntryView->addColumn( i18n("Use Preferred") ); 193 mEntryView->addColumn( i18n("Use Preferred") );
188 mEntryView->setEnabled(false); 194 mEntryView->setEnabled(false);
189 mEntryView->setAllColumnsShowFocus( true ); 195 mEntryView->setAllColumnsShowFocus( true );
190 gridLayout->addMultiCellWidget( mEntryView, 1, 1, 1, 2 ); 196 gridLayout->addMultiCellWidget( mEntryView, 1, 1, 1, 2 );
191 connect( mEntryView, SIGNAL( selectionChanged() ), 197 connect( mEntryView, SIGNAL( selectionChanged() ),
192 SLOT( slotSelectionEntryViewChanged() ) ); 198 SLOT( slotSelectionEntryViewChanged() ) );
193 199
194 mChangeEmailButton = new QPushButton( i18n("Change Email..."), this ); 200 mChangeEmailButton = new QPushButton( i18n("Change Email..."), this );
195 gridLayout->addWidget( mChangeEmailButton, 2, 1 ); 201 gridLayout->addWidget( mChangeEmailButton, 2, 1 );
196 connect( mChangeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) ); 202 connect( mChangeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) );
diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h
index b6d3c80..3627431 100644
--- a/kabc/distributionlistdialog.h
+++ b/kabc/distributionlistdialog.h
@@ -13,31 +13,33 @@
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#ifndef KABC_DISTRIBUTIONLISTDIALOG_H 21#ifndef KABC_DISTRIBUTIONLISTDIALOG_H
22#define KABC_DISTRIBUTIONLISTDIALOG_H 22#define KABC_DISTRIBUTIONLISTDIALOG_H
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25//Added by qt3to4:
26#include <QLabel>
25 27
26#include <kdialogbase.h> 28#include <kdialogbase.h>
27 29
28class QListView; 30class Q3ListView;
29class QLabel; 31class QLabel;
30class QComboBox; 32class QComboBox;
31class QButtonGroup; 33class Q3ButtonGroup;
32 34
33namespace KABC { 35namespace KABC {
34 36
35class AddressBook; 37class AddressBook;
36class DistributionListEditorWidget; 38class DistributionListEditorWidget;
37class DistributionListManager; 39class DistributionListManager;
38 40
39/** 41/**
40 @short Frontend to create distribution lists 42 @short Frontend to create distribution lists
41 43
42 Creating a new DistributionListDialog does automatically 44 Creating a new DistributionListDialog does automatically
43 load all addressees and distribution lists from the config 45 load all addressees and distribution lists from the config
@@ -84,25 +86,25 @@ class DistributionListDialog : public KDialogBase
84class EmailSelector : public KDialogBase 86class EmailSelector : public KDialogBase
85{ 87{
86 public: 88 public:
87 EmailSelector( const QStringList &emails, const QString &current, 89 EmailSelector( const QStringList &emails, const QString &current,
88 QWidget *parent ); 90 QWidget *parent );
89 91
90 QString selected(); 92 QString selected();
91 93
92 static QString getEmail( const QStringList &emails, const QString &current, 94 static QString getEmail( const QStringList &emails, const QString &current,
93 QWidget *parent ); 95 QWidget *parent );
94 96
95 private: 97 private:
96 QButtonGroup *mButtonGroup; 98 Q3ButtonGroup *mButtonGroup;
97}; 99};
98 100
99/** 101/**
100 @short Helper class 102 @short Helper class
101*/ 103*/
102class DistributionListEditorWidget : public QWidget 104class DistributionListEditorWidget : public QWidget
103{ 105{
104 Q_OBJECT 106 Q_OBJECT
105 107
106 public: 108 public:
107 DistributionListEditorWidget( AddressBook *, QWidget *parent ); 109 DistributionListEditorWidget( AddressBook *, QWidget *parent );
108 virtual ~DistributionListEditorWidget(); 110 virtual ~DistributionListEditorWidget();
@@ -115,26 +117,26 @@ class DistributionListEditorWidget : public QWidget
115 void removeEntry(); 117 void removeEntry();
116 void changeEmail(); 118 void changeEmail();
117 void updateEntryView(); 119 void updateEntryView();
118 void updateAddresseeView(); 120 void updateAddresseeView();
119 void updateNameCombo(); 121 void updateNameCombo();
120 void slotSelectionEntryViewChanged(); 122 void slotSelectionEntryViewChanged();
121 void slotSelectionAddresseeViewChanged(); 123 void slotSelectionAddresseeViewChanged();
122 void save(); 124 void save();
123 125
124 private: 126 private:
125 QComboBox *mNameCombo; 127 QComboBox *mNameCombo;
126 QLabel *mListLabel; 128 QLabel *mListLabel;
127 QListView *mEntryView; 129 Q3ListView *mEntryView;
128 QListView *mAddresseeView; 130 Q3ListView *mAddresseeView;
129 131
130 AddressBook *mAddressBook; 132 AddressBook *mAddressBook;
131 DistributionListManager *mManager; 133 DistributionListManager *mManager;
132 QPushButton *mNewButton, *mEditButton, *mRemoveButton; 134 QPushButton *mNewButton, *mEditButton, *mRemoveButton;
133 QPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton; 135 QPushButton *mChangeEmailButton, *mRemoveEntryButton, *mAddEntryButton;
134 136
135 struct Data; 137 struct Data;
136 Data *d; 138 Data *d;
137}; 139};
138 140
139} 141}
140#endif 142#endif
diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp
index 9f5840b..ca5ecb7 100644
--- a/kabc/distributionlisteditor.cpp
+++ b/kabc/distributionlisteditor.cpp
@@ -9,97 +9,101 @@
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qlistview.h> 21#include <q3listview.h>
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qpushbutton.h> 23#include <qpushbutton.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
25#ifdef DESKTOP_VERSION 25#ifdef DESKTOP_VERSION
26#include <qinputdialog.h> 26#include <qinputdialog.h>
27#else 27#else
28#include <qtcompat/qinputdialog.h> 28#include <qtcompat/qinputdialog.h>
29#endif 29#endif
30#include <qbuttongroup.h> 30#include <q3buttongroup.h>
31#include <qradiobutton.h> 31#include <qradiobutton.h>
32//Added by qt3to4:
33#include <Q3HBoxLayout>
34#include <Q3Frame>
35#include <Q3VBoxLayout>
32 36
33#include <klocale.h> 37#include <klocale.h>
34#include <kdebug.h> 38#include <kdebug.h>
35 39
36#include "addressbook.h" 40#include "addressbook.h"
37#include "addresseedialog.h" 41#include "addresseedialog.h"
38#include "distributionlist.h" 42#include "distributionlist.h"
39 43
40#include "distributionlisteditor.h" 44#include "distributionlisteditor.h"
41 45
42//US #include "distributionlisteditor.moc" 46//US #include "distributionlisteditor.moc"
43 47
44using namespace KABC; 48using namespace KABC;
45 49
46EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &current, 50EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &current,
47 QWidget *parent ) : 51 QWidget *parent ) :
48 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, 52 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
49 parent ) 53 parent )
50{ 54{
51 QFrame *topFrame = plainPage(); 55 Q3Frame *topFrame = plainPage();
52 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 56 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
53 57
54 mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), 58 mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
55 topFrame ); 59 topFrame );
56 topLayout->addWidget( mButtonGroup ); 60 topLayout->addWidget( mButtonGroup );
57 61
58 QStringList::ConstIterator it; 62 QStringList::ConstIterator it;
59 for( it = emails.begin(); it != emails.end(); ++it ) { 63 for( it = emails.begin(); it != emails.end(); ++it ) {
60 QRadioButton *button = new QRadioButton( *it, mButtonGroup ); 64 QRadioButton *button = new QRadioButton( *it, mButtonGroup );
61 if ( (*it) == current ) { 65 if ( (*it) == current ) {
62 button->setDown( true ); 66 button->setDown( true );
63 } 67 }
64 } 68 }
65} 69}
66 70
67QString EmailSelectDialog::selected() 71QString EmailSelectDialog::selected()
68{ 72{
69 QButton *button = mButtonGroup->selected(); 73 QAbstractButton *button = mButtonGroup->selected();
70 if ( button ) return button->text(); 74 if ( button ) return button->text();
71 return QString::null; 75 return QString::null;
72} 76}
73 77
74QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &current, 78QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &current,
75 QWidget *parent ) 79 QWidget *parent )
76{ 80{
77 81
78 EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent ); 82 EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent );
79 dlg->exec(); 83 dlg->exec();
80 84
81 QString result = dlg->selected(); 85 QString result = dlg->selected();
82 86
83 delete dlg; 87 delete dlg;
84 88
85 return result; 89 return result;
86} 90}
87 91
88class EditEntryItem : public QListViewItem 92class EditEntryItem : public Q3ListViewItem
89{ 93{
90 public: 94 public:
91 EditEntryItem( QListView *parent, const Addressee &addressee, 95 EditEntryItem( Q3ListView *parent, const Addressee &addressee,
92 const QString &email=QString::null ) : 96 const QString &email=QString::null ) :
93 QListViewItem( parent ), 97 Q3ListViewItem( parent ),
94 mAddressee( addressee ), 98 mAddressee( addressee ),
95 mEmail( email ) 99 mEmail( email )
96 { 100 {
97 setText( 0, addressee.realName() ); 101 setText( 0, addressee.realName() );
98 if( email.isEmpty() ) { 102 if( email.isEmpty() ) {
99 setText( 1, addressee.preferredEmail() ); 103 setText( 1, addressee.preferredEmail() );
100 setText( 2, i18n("Yes") ); 104 setText( 2, i18n("Yes") );
101 } else { 105 } else {
102 setText( 1, email ); 106 setText( 1, email );
103 setText( 2, i18n("No") ); 107 setText( 2, i18n("No") );
104 } 108 }
105 } 109 }
@@ -116,62 +120,62 @@ class EditEntryItem : public QListViewItem
116 120
117 private: 121 private:
118 Addressee mAddressee; 122 Addressee mAddressee;
119 QString mEmail; 123 QString mEmail;
120}; 124};
121 125
122DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidget *parent) : 126DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidget *parent) :
123 QWidget( parent ), 127 QWidget( parent ),
124 mAddressBook( addressBook ) 128 mAddressBook( addressBook )
125{ 129{
126 kdDebug(5700) << "DistributionListEditor()" << endl; 130 kdDebug(5700) << "DistributionListEditor()" << endl;
127 131
128 QBoxLayout *topLayout = new QVBoxLayout( this ); 132 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
129 topLayout->setMargin( KDialog::marginHint() ); 133 topLayout->setMargin( KDialog::marginHint() );
130 topLayout->setSpacing( KDialog::spacingHint() ); 134 topLayout->setSpacing( KDialog::spacingHint() );
131 135
132 QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; 136 Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ;
133 137
134 mNameCombo = new QComboBox( this ); 138 mNameCombo = new QComboBox( this );
135 nameLayout->addWidget( mNameCombo ); 139 nameLayout->addWidget( mNameCombo );
136 connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) ); 140 connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateEntryView() ) );
137 141
138 newButton = new QPushButton( i18n("New List"), this ); 142 newButton = new QPushButton( i18n("New List"), this );
139 nameLayout->addWidget( newButton ); 143 nameLayout->addWidget( newButton );
140 connect( newButton, SIGNAL( clicked() ), SLOT( newList() ) ); 144 connect( newButton, SIGNAL( clicked() ), SLOT( newList() ) );
141 145
142 removeButton = new QPushButton( i18n("Remove List"), this ); 146 removeButton = new QPushButton( i18n("Remove List"), this );
143 nameLayout->addWidget( removeButton ); 147 nameLayout->addWidget( removeButton );
144 connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) ); 148 connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) );
145 149
146 mEntryView = new QListView( this ); 150 mEntryView = new Q3ListView( this );
147 mEntryView->addColumn( i18n("Name") ); 151 mEntryView->addColumn( i18n("Name") );
148 mEntryView->addColumn( i18n("Email") ); 152 mEntryView->addColumn( i18n("Email") );
149 mEntryView->addColumn( i18n("Use Preferred") ); 153 mEntryView->addColumn( i18n("Use Preferred") );
150 topLayout->addWidget( mEntryView ); 154 topLayout->addWidget( mEntryView );
151 connect(mEntryView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionEntryViewChanged())); 155 connect(mEntryView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionEntryViewChanged()));
152 156
153 changeEmailButton = new QPushButton( i18n("Change Email"), this ); 157 changeEmailButton = new QPushButton( i18n("Change Email"), this );
154 topLayout->addWidget( changeEmailButton ); 158 topLayout->addWidget( changeEmailButton );
155 connect( changeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) ); 159 connect( changeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) );
156 160
157 removeEntryButton = new QPushButton( i18n("Remove Entry"), this ); 161 removeEntryButton = new QPushButton( i18n("Remove Entry"), this );
158 topLayout->addWidget( removeEntryButton ); 162 topLayout->addWidget( removeEntryButton );
159 connect( removeEntryButton, SIGNAL( clicked() ), SLOT( removeEntry() ) ); 163 connect( removeEntryButton, SIGNAL( clicked() ), SLOT( removeEntry() ) );
160 164
161 addEntryButton = new QPushButton( i18n("Add Entry"), this ); 165 addEntryButton = new QPushButton( i18n("Add Entry"), this );
162 topLayout->addWidget( addEntryButton ); 166 topLayout->addWidget( addEntryButton );
163 connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); 167 connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
164 168
165 mAddresseeView = new QListView( this ); 169 mAddresseeView = new Q3ListView( this );
166 mAddresseeView->addColumn( i18n("Name") ); 170 mAddresseeView->addColumn( i18n("Name") );
167 mAddresseeView->addColumn( i18n("Preferred Email") ); 171 mAddresseeView->addColumn( i18n("Preferred Email") );
168 topLayout->addWidget( mAddresseeView ); 172 topLayout->addWidget( mAddresseeView );
169 173
170 174
171 connect(mAddresseeView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionAddresseeViewChanged())); 175 connect(mAddresseeView,SIGNAL(selectionChanged ()),this, SLOT(slotSelectionAddresseeViewChanged()));
172 176
173 mManager = new DistributionListManager( mAddressBook ); 177 mManager = new DistributionListManager( mAddressBook );
174 mManager->load(); 178 mManager->load();
175 179
176 updateAddresseeView(); 180 updateAddresseeView();
177 updateNameCombo(); 181 updateNameCombo();
diff --git a/kabc/distributionlisteditor.h b/kabc/distributionlisteditor.h
index e0b4221..e672a14 100644
--- a/kabc/distributionlisteditor.h
+++ b/kabc/distributionlisteditor.h
@@ -15,46 +15,46 @@
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20#ifndef KABC_DISTRIBUTIONLISTEDITOR_H 20#ifndef KABC_DISTRIBUTIONLISTEDITOR_H
21#define KABC_DISTRIBUTIONLISTEDITOR_H 21#define KABC_DISTRIBUTIONLISTEDITOR_H
22 22
23#include <qwidget.h> 23#include <qwidget.h>
24 24
25#include <kdialogbase.h> 25#include <kdialogbase.h>
26 26
27class QListView; 27class Q3ListView;
28class QComboBox; 28class QComboBox;
29class QButtonGroup; 29class Q3ButtonGroup;
30 30
31namespace KABC { 31namespace KABC {
32 32
33class AddressBook; 33class AddressBook;
34class DistributionListManager; 34class DistributionListManager;
35 35
36class EmailSelectDialog : public KDialogBase 36class EmailSelectDialog : public KDialogBase
37{ 37{
38 public: 38 public:
39 EmailSelectDialog( const QStringList &emails, const QString &current, 39 EmailSelectDialog( const QStringList &emails, const QString &current,
40 QWidget *parent ); 40 QWidget *parent );
41 41
42 QString selected(); 42 QString selected();
43 43
44 static QString getEmail( const QStringList &emails, const QString &current, 44 static QString getEmail( const QStringList &emails, const QString &current,
45 QWidget *parent ); 45 QWidget *parent );
46 46
47 private: 47 private:
48 QButtonGroup *mButtonGroup; 48 Q3ButtonGroup *mButtonGroup;
49}; 49};
50 50
51/** 51/**
52 @obsolete 52 @obsolete
53*/ 53*/
54class DistributionListEditor : public QWidget 54class DistributionListEditor : public QWidget
55{ 55{
56 Q_OBJECT 56 Q_OBJECT
57 public: 57 public:
58 DistributionListEditor( AddressBook *, QWidget *parent ); 58 DistributionListEditor( AddressBook *, QWidget *parent );
59 virtual ~DistributionListEditor(); 59 virtual ~DistributionListEditor();
60 60
@@ -63,24 +63,24 @@ class DistributionListEditor : public QWidget
63 void removeList(); 63 void removeList();
64 void addEntry(); 64 void addEntry();
65 void removeEntry(); 65 void removeEntry();
66 void changeEmail(); 66 void changeEmail();
67 void updateEntryView(); 67 void updateEntryView();
68 void updateAddresseeView(); 68 void updateAddresseeView();
69 void updateNameCombo(); 69 void updateNameCombo();
70 void slotSelectionEntryViewChanged(); 70 void slotSelectionEntryViewChanged();
71 void slotSelectionAddresseeViewChanged(); 71 void slotSelectionAddresseeViewChanged();
72 72
73 private: 73 private:
74 QComboBox *mNameCombo; 74 QComboBox *mNameCombo;
75 QListView *mEntryView; 75 Q3ListView *mEntryView;
76 QListView *mAddresseeView; 76 Q3ListView *mAddresseeView;
77 77
78 AddressBook *mAddressBook; 78 AddressBook *mAddressBook;
79 DistributionListManager *mManager; 79 DistributionListManager *mManager;
80 QPushButton *newButton, *removeButton; 80 QPushButton *newButton, *removeButton;
81 QPushButton *changeEmailButton,*removeEntryButton,*addEntryButton; 81 QPushButton *changeEmailButton,*removeEntryButton,*addEntryButton;
82}; 82};
83 83
84} 84}
85 85
86#endif 86#endif
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 7c6d7a9..203f696 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -24,24 +24,26 @@ Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#include <klocale.h> 29#include <klocale.h>
30#include <kconfig.h> 30#include <kconfig.h>
31#include <kconfigbase.h> 31#include <kconfigbase.h>
32#include <kglobal.h> 32#include <kglobal.h>
33 33
34#include "field.h" 34#include "field.h"
35#include "resource.h" 35#include "resource.h"
36//Added by qt3to4:
37#include <Q3ValueList>
36 38
37using namespace KABC; 39using namespace KABC;
38 40
39class Field::FieldImpl 41class Field::FieldImpl
40{ 42{
41 public: 43 public:
42 FieldImpl( int fieldId, int category = 0, 44 FieldImpl( int fieldId, int category = 0,
43 const QString &label = QString::null, 45 const QString &label = QString::null,
44 const QString &key = QString::null, 46 const QString &key = QString::null,
45 const QString &app = QString::null ) 47 const QString &app = QString::null )
46 : mFieldId( fieldId ), mCategory( category ), mLabel( label ), 48 : mFieldId( fieldId ), mCategory( category ), mLabel( label ),
47 mKey( key ), mApp( app ) {} 49 mKey( key ), mApp( app ) {}
@@ -368,25 +370,25 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
368 case FieldImpl::Organization: 370 case FieldImpl::Organization:
369 a.setOrganization( value ); 371 a.setOrganization( value );
370 return true; 372 return true;
371 case FieldImpl::Note: 373 case FieldImpl::Note:
372 a.setNote( value ); 374 a.setNote( value );
373 return true; 375 return true;
374 case FieldImpl::Birthday: 376 case FieldImpl::Birthday:
375//US 377//US
376//the generated code had the following format: return a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); 378//the generated code had the following format: return a.setBirthday( QDate::fromString( value, Qt::ISODate ) );
377// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? 379// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
378 { 380 {
379 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate 381 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
380 a.setBirthday(dt); 382 a.setBirthday((QDateTime)dt);
381 } 383 }
382 return true; 384 return true;
383 case FieldImpl::CustomField: 385 case FieldImpl::CustomField:
384 a.insertCustom( mImpl->app(), mImpl->key(), value ); 386 a.insertCustom( mImpl->app(), mImpl->key(), value );
385//US never copy the resourcename back to the adressee. 387//US never copy the resourcename back to the adressee.
386 case FieldImpl::Resource: 388 case FieldImpl::Resource:
387 default: 389 default:
388 return false; 390 return false;
389 } 391 }
390} 392}
391 393
392bool Field::isCustom() 394bool Field::isCustom()
@@ -484,25 +486,25 @@ void Field::deleteFields()
484 486
485void Field::saveFields( const QString &identifier, 487void Field::saveFields( const QString &identifier,
486 const Field::List &fields ) 488 const Field::List &fields )
487{ 489{
488 KConfig *cfg = KGlobal::config(); 490 KConfig *cfg = KGlobal::config();
489 KConfigGroupSaver( cfg, "KABCFields" ); 491 KConfigGroupSaver( cfg, "KABCFields" );
490 saveFields( cfg, identifier, fields ); 492 saveFields( cfg, identifier, fields );
491} 493}
492 494
493void Field::saveFields( KConfig *cfg, const QString &identifier, 495void Field::saveFields( KConfig *cfg, const QString &identifier,
494 const Field::List &fields ) 496 const Field::List &fields )
495{ 497{
496 QValueList<int> fieldIds; 498 Q3ValueList<int> fieldIds;
497 499
498//US 500//US
499// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1()); 501// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1());
500 502
501 int custom = 0; 503 int custom = 0;
502 Field::List::ConstIterator it; 504 Field::List::ConstIterator it;
503 for( it = fields.begin(); it != fields.end(); ++it ) { 505 for( it = fields.begin(); it != fields.end(); ++it ) {
504//US 506//US
505// qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId()); 507// qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId());
506 508
507 fieldIds.append( (*it)->mImpl->fieldId() ); 509 fieldIds.append( (*it)->mImpl->fieldId() );
508 if( (*it)->isCustom() ) { 510 if( (*it)->isCustom() ) {
@@ -524,32 +526,32 @@ Field::List Field::restoreFields( const QString &identifier )
524 526
525 KConfig *cfg = KGlobal::config(); 527 KConfig *cfg = KGlobal::config();
526 KConfigGroupSaver( cfg, "KABCFields" ); 528 KConfigGroupSaver( cfg, "KABCFields" );
527 cfg->setGroup( "KABCFields" ); 529 cfg->setGroup( "KABCFields" );
528 530
529 Field::List l = restoreFields( cfg, identifier ); 531 Field::List l = restoreFields( cfg, identifier );
530 532
531 return l; 533 return l;
532} 534}
533 535
534Field::List Field::restoreFields( KConfig *cfg, const QString &identifier ) 536Field::List Field::restoreFields( KConfig *cfg, const QString &identifier )
535{ 537{
536 QValueList<int> fieldIds = cfg->readIntListEntry( identifier); 538 Q3ValueList<int> fieldIds = cfg->readIntListEntry( identifier);
537//US 539//US
538// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1()); 540// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1());
539 541
540 Field::List fields; 542 Field::List fields;
541 543
542 int custom = 0; 544 int custom = 0;
543 QValueList<int>::ConstIterator it; 545 Q3ValueList<int>::ConstIterator it;
544 for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { 546 for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) {
545 FieldImpl *f = 0; 547 FieldImpl *f = 0;
546 if ( (*it) == FieldImpl::CustomField ) { 548 if ( (*it) == FieldImpl::CustomField ) {
547 QStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" + 549 QStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
548 identifier + "_" + 550 identifier + "_" +
549 QString::number( custom++ ) ); 551 QString::number( custom++ ) );
550 f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ], 552 f = new FieldImpl( *it, CustomCategory, customEntry[ 0 ],
551 customEntry[ 1 ], customEntry[ 2 ] ); 553 customEntry[ 1 ], customEntry[ 2 ] );
552 } else { 554 } else {
553 f = new FieldImpl( *it ); 555 f = new FieldImpl( *it );
554 } 556 }
555 fields.append( new Field( f ) ); 557 fields.append( new Field( f ) );
diff --git a/kabc/field.h b/kabc/field.h
index 9e06597..55cc705 100644
--- a/kabc/field.h
+++ b/kabc/field.h
@@ -20,39 +20,39 @@
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_FIELD_H 28#ifndef KABC_FIELD_H
29#define KABC_FIELD_H 29#define KABC_FIELD_H
30 30
31#include <qstring.h> 31#include <qstring.h>
32#include <qvaluelist.h> 32#include <q3valuelist.h>
33 33
34#include "addressee.h" 34#include "addressee.h"
35 35
36class KConfig; 36class KConfig;
37 37
38namespace KABC { 38namespace KABC {
39 39
40class Field 40class Field
41{ 41{
42 class FieldImpl; 42 class FieldImpl;
43 friend class FieldImpl; 43 friend class FieldImpl;
44 44
45public: 45public:
46 typedef QValueList<Field *> List; 46 typedef Q3ValueList<Field *> List;
47 47
48 /** 48 /**
49 * @li @p All - 49 * @li @p All -
50 * @li @p Frequent - 50 * @li @p Frequent -
51 * @li @p Address - 51 * @li @p Address -
52 * @li @p Email - 52 * @li @p Email -
53 * @li @p Personal - 53 * @li @p Personal -
54 * @li @p Organization - 54 * @li @p Organization -
55 * @li @p CustomCategory - 55 * @li @p CustomCategory -
56 */ 56 */
57 enum FieldCategory 57 enum FieldCategory
58 { 58 {
diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp
index 3ae1c27..cbb97a2 100644
--- a/kabc/formatfactory.cpp
+++ b/kabc/formatfactory.cpp
@@ -93,25 +93,25 @@ US lets enter all resources directly instead of using teh desktopfiles.
93FormatFactory::~FormatFactory() 93FormatFactory::~FormatFactory()
94{ 94{
95 mFormatList.clear(); 95 mFormatList.clear();
96} 96}
97 97
98QStringList FormatFactory::formats() 98QStringList FormatFactory::formats()
99{ 99{
100 QStringList retval; 100 QStringList retval;
101 101
102 // make sure 'vcard' is the first entry 102 // make sure 'vcard' is the first entry
103 retval << "vcard"; 103 retval << "vcard";
104 104
105 QDictIterator<FormatInfo> it( mFormatList ); 105 Q3DictIterator<FormatInfo> it( mFormatList );
106 for ( ; it.current(); ++it ) 106 for ( ; it.current(); ++it )
107 if ( it.currentKey() != "vcard" ) 107 if ( it.currentKey() != "vcard" )
108 retval << it.currentKey(); 108 retval << it.currentKey();
109 109
110 return retval; 110 return retval;
111} 111}
112 112
113FormatInfo *FormatFactory::info( const QString &type ) 113FormatInfo *FormatFactory::info( const QString &type )
114{ 114{
115 if ( type.isEmpty() ) 115 if ( type.isEmpty() )
116 return 0; 116 return 0;
117 else 117 else
diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h
index 9612374..de15b17 100644
--- a/kabc/formatfactory.h
+++ b/kabc/formatfactory.h
@@ -12,25 +12,25 @@
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#ifndef KABC_FORMATFACTORY_H 21#ifndef KABC_FORMATFACTORY_H
22#define KABC_FORMATFACTORY_H 22#define KABC_FORMATFACTORY_H
23 23
24#include <qdict.h> 24#include <q3dict.h>
25#include <qstring.h> 25#include <qstring.h>
26 26
27#include <kconfig.h> 27#include <kconfig.h>
28#ifndef DESKTOP_VERSION 28#ifndef DESKTOP_VERSION
29#include <klibloader.h> 29#include <klibloader.h>
30#endif 30#endif
31 31
32#include "formatplugin.h" 32#include "formatplugin.h"
33 33
34namespace KABC { 34namespace KABC {
35 35
36struct FormatInfo 36struct FormatInfo
@@ -88,17 +88,17 @@ class FormatFactory
88 */ 88 */
89 FormatInfo *info( const QString &type ); 89 FormatInfo *info( const QString &type );
90 90
91 protected: 91 protected:
92 FormatFactory(); 92 FormatFactory();
93 93
94 private: 94 private:
95#ifndef DESKTOP_VERSION 95#ifndef DESKTOP_VERSION
96 KLibrary *openLibrary( const QString& libName ); 96 KLibrary *openLibrary( const QString& libName );
97#endif 97#endif
98 static FormatFactory *mSelf; 98 static FormatFactory *mSelf;
99 99
100 QDict<FormatInfo> mFormatList; 100 Q3Dict<FormatInfo> mFormatList;
101}; 101};
102 102
103} 103}
104#endif 104#endif
diff --git a/kabc/formats/binary/kabcformat_binaryE.pro b/kabc/formats/binary/kabcformat_binaryE.pro
index 2d9594d..c71197e 100644
--- a/kabc/formats/binary/kabcformat_binaryE.pro
+++ b/kabc/formats/binary/kabcformat_binaryE.pro
@@ -1,21 +1,21 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5TARGET = microkabcformat_binary 5TARGET = microkabcformat_binary
6#INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../qtcompat 6#INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../qtcompat
7INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../qtcompat 7INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../qtcompat
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc 9MOC_DIR = moc
10DESTDIR = $(QPEDIR)/lib 10DESTDIR = $(QPEDIR)/lib
11LIBS += -lmicrokde -lmicrokabc 11LIBS += -lxmicrokde -lxmicrokabc
12LIBS += -L$(QPEDIR)/lib 12LIBS += -L$(QPEDIR)/lib
13DEFINES += KAB_EMBEDDED 13DEFINES += KAB_EMBEDDED
14 14
15INTERFACES = \ 15INTERFACES = \
16 16
17HEADERS = \ 17HEADERS = \
18 binaryformat.h 18 binaryformat.h
19 19
20SOURCES = \ 20SOURCES = \
21 binaryformat.cpp 21 binaryformat.cpp
diff --git a/kabc/formats/vcardformatplugin2.cpp b/kabc/formats/vcardformatplugin2.cpp
index 41b0c9a..fbebe92 100644
--- a/kabc/formats/vcardformatplugin2.cpp
+++ b/kabc/formats/vcardformatplugin2.cpp
@@ -2,25 +2,25 @@
2Enhanced Version of the file for platform independent KDE tools. 2Enhanced Version of the file for platform independent KDE tools.
3Copyright (c) 2004 Ulf Schenk 3Copyright (c) 2004 Ulf Schenk
4 4
5$Id$ 5$Id$
6*/ 6*/
7 7
8#include "vcardformatplugin2.h" 8#include "vcardformatplugin2.h"
9 9
10#include "address.h" 10#include "address.h"
11#include "addressee.h" 11#include "addressee.h"
12#include "vcardparser/vcardtool.h" 12#include "vcardparser/vcardtool.h"
13 13
14#include <qtextstream.h> 14#include <q3textstream.h>
15#include <qfile.h> 15#include <qfile.h>
16 16
17using namespace KABC; 17using namespace KABC;
18 18
19extern "C" 19extern "C"
20{ 20{
21 FormatPlugin *format() 21 FormatPlugin *format()
22 { 22 {
23 return new VCardFormatPlugin2(); 23 return new VCardFormatPlugin2();
24 } 24 }
25} 25}
26 26
@@ -28,47 +28,47 @@ VCardFormatPlugin2::VCardFormatPlugin2()
28{ 28{
29} 29}
30 30
31VCardFormatPlugin2::~VCardFormatPlugin2() 31VCardFormatPlugin2::~VCardFormatPlugin2()
32{ 32{
33} 33}
34 34
35bool VCardFormatPlugin2::load( Addressee &addressee, QFile *file ) 35bool VCardFormatPlugin2::load( Addressee &addressee, QFile *file )
36{ 36{
37 qDebug("VCardFormatPlugin2::load"); 37 qDebug("VCardFormatPlugin2::load");
38 QString data; 38 QString data;
39 39
40 QTextStream t( file ); 40 Q3TextStream t( file );
41 t.setEncoding( QTextStream::UnicodeUTF8 ); 41 t.setEncoding( Q3TextStream::UnicodeUTF8 );
42 data = t.read(); 42 data = t.read();
43 43
44 VCardTool tool; 44 VCardTool tool;
45 45
46 Addressee::List l = tool.parseVCards( data ); 46 Addressee::List l = tool.parseVCards( data );
47 47
48 if ( ! l.first().isEmpty() ) { 48 if ( ! l.first().isEmpty() ) {
49 addressee = l.first(); 49 addressee = l.first();
50 return true; 50 return true;
51 } 51 }
52 52
53 return false; 53 return false;
54} 54}
55 55
56bool VCardFormatPlugin2::loadAll( AddressBook *addressBook, Resource *resource, QFile *file ) 56bool VCardFormatPlugin2::loadAll( AddressBook *addressBook, Resource *resource, QFile *file )
57{ 57{
58 qDebug("VCardFormatPlugin2::loadAll"); 58 qDebug("VCardFormatPlugin2::loadAll");
59 QString data; 59 QString data;
60 60
61 QTextStream t( file ); 61 Q3TextStream t( file );
62 t.setEncoding( QTextStream::UnicodeUTF8 ); 62 t.setEncoding( Q3TextStream::UnicodeUTF8 );
63 data = t.read(); 63 data = t.read();
64 64
65 VCardTool tool; 65 VCardTool tool;
66 66
67 Addressee::List l = tool.parseVCards( data ); 67 Addressee::List l = tool.parseVCards( data );
68 68
69 Addressee::List::Iterator itr; 69 Addressee::List::Iterator itr;
70 70
71 for ( itr = l.begin(); itr != l.end(); ++itr) { 71 for ( itr = l.begin(); itr != l.end(); ++itr) {
72 Addressee addressee = *itr; 72 Addressee addressee = *itr;
73 addressee.setResource( resource ); 73 addressee.setResource( resource );
74 addressBook->insertAddressee( addressee ); 74 addressBook->insertAddressee( addressee );
@@ -77,48 +77,48 @@ bool VCardFormatPlugin2::loadAll( AddressBook *addressBook, Resource *resource,
77 return true; 77 return true;
78} 78}
79 79
80void VCardFormatPlugin2::save( const Addressee &addressee, QFile *file ) 80void VCardFormatPlugin2::save( const Addressee &addressee, QFile *file )
81{ 81{
82 qDebug("VCardFormatPlugin2::save"); 82 qDebug("VCardFormatPlugin2::save");
83 VCardTool tool; 83 VCardTool tool;
84 Addressee::List vcardlist; 84 Addressee::List vcardlist;
85 85
86 86
87 vcardlist.append( addressee ); 87 vcardlist.append( addressee );
88 88
89 QTextStream t( file ); 89 Q3TextStream t( file );
90 t.setEncoding( QTextStream::UnicodeUTF8 ); 90 t.setEncoding( Q3TextStream::UnicodeUTF8 );
91 t << tool.createVCards( vcardlist ); 91 t << tool.createVCards( vcardlist );
92} 92}
93 93
94void VCardFormatPlugin2::saveAll( AddressBook *ab, Resource *resource, QFile *file ) 94void VCardFormatPlugin2::saveAll( AddressBook *ab, Resource *resource, QFile *file )
95{ 95{
96 qDebug("VCardFormatPlugin2::saveAll"); 96 qDebug("VCardFormatPlugin2::saveAll");
97 VCardTool tool; 97 VCardTool tool;
98 Addressee::List vcardlist; 98 Addressee::List vcardlist;
99 99
100 AddressBook::Iterator it; 100 AddressBook::Iterator it;
101 for ( it = ab->begin(); it != ab->end(); ++it ) { 101 for ( it = ab->begin(); it != ab->end(); ++it ) {
102 if ( (*it).resource() == resource ) { 102 if ( (*it).resource() == resource ) {
103 (*it).setChanged( false ); 103 (*it).setChanged( false );
104 vcardlist.append( *it ); 104 vcardlist.append( *it );
105 } 105 }
106 } 106 }
107 107
108 QTextStream t( file ); 108 Q3TextStream t( file );
109 t.setEncoding( QTextStream::UnicodeUTF8 ); 109 t.setEncoding( Q3TextStream::UnicodeUTF8 );
110 t << tool.createVCards( vcardlist ); 110 t << tool.createVCards( vcardlist );
111} 111}
112 112
113bool VCardFormatPlugin2::checkFormat( QFile *file ) const 113bool VCardFormatPlugin2::checkFormat( QFile *file ) const
114{ 114{
115 QString line; 115 QString line;
116 116
117 file->readLine( line, 1024 ); 117 char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp;
118 line = line.stripWhiteSpace(); 118 line = line.stripWhiteSpace();
119 if ( line == "BEGIN:VCARD" ) 119 if ( line == "BEGIN:VCARD" )
120 return true; 120 return true;
121 else 121 else
122 return false; 122 return false;
123} 123}
124 124
diff --git a/kabc/kabc.pro b/kabc/kabc.pro
index 17ebff8..846ed8a 100644
--- a/kabc/kabc.pro
+++ b/kabc/kabc.pro
@@ -1,24 +1,24 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3#release debug 3#release debug
4DESTDIR=../bin 4DESTDIR=../bin
5 5
6TARGET = microkabc 6TARGET = xmicrokabc
7 7
8include( ../variables.pri ) 8include( ../variables.pri )
9 9
10INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim ../qtcompat ../microkde/kdeui .. 10INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim ../qtcompat ../microkde/kdeui ..
11 11
12#LIBS += -lmicrokde -lldap 12#LIBS += -lxmicrokde -lldap
13LIBS += -L$(QPEDIR)/lib 13LIBS += -L$(QPEDIR)/lib
14DEFINES += KAB_EMBEDDED DESKTOP_VERSION 14DEFINES += KAB_EMBEDDED DESKTOP_VERSION
15unix : { 15unix : {
16 16
17OBJECTS_DIR = obj/unix 17OBJECTS_DIR = obj/unix
18MOC_DIR = moc/unix 18MOC_DIR = moc/unix
19} 19}
20win32: { 20win32: {
21DEFINES += _WIN32_ 21DEFINES += _WIN32_
22OBJECTS_DIR = obj/win 22OBJECTS_DIR = obj/win
23MOC_DIR = moc/win 23MOC_DIR = moc/win
24} 24}
@@ -207,12 +207,16 @@ vcard/TelValue.cpp \
207vcard/TextBinValue.cpp \ 207vcard/TextBinValue.cpp \
208vcard/OrgValue.cpp \ 208vcard/OrgValue.cpp \
209vcard/UTCValue.cpp \ 209vcard/UTCValue.cpp \
210vcard/ClassValue.cpp \ 210vcard/ClassValue.cpp \
211vcard/FloatValue.cpp \ 211vcard/FloatValue.cpp \
212vcard/TextListValue.cpp 212vcard/TextListValue.cpp
213 213
214 214
215# plugins/ldap/resourceldap.cpp \ 215# plugins/ldap/resourceldap.cpp \
216# plugins/ldap/resourceldapconfig.cpp \ 216# plugins/ldap/resourceldapconfig.cpp \
217 217
218#formats/binary/binaryformat.cpp \ 218#formats/binary/binaryformat.cpp \
219#The following line was inserted by qt3to4
220QT += xml qt3support
221#The following line was inserted by qt3to4
222QT +=
diff --git a/kabc/kabcE.pro b/kabc/kabcE.pro
index 1d28a4d..6045b68 100644
--- a/kabc/kabcE.pro
+++ b/kabc/kabcE.pro
@@ -1,23 +1,23 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3TARGET = microkabc 3TARGET = xmicrokabc
4 4
5 5
6INCLUDEPATH += . $(KDEPIMDIR) vcard/include vcard/include/generated $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 6INCLUDEPATH += . $(KDEPIMDIR) vcard/include vcard/include/generated $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde 10LIBS += -lxmicrokde
11LIBS += -lmicrokdepim 11LIBS += -lxmicrokdepim
12#LIBS += -lldap 12#LIBS += -lldap
13LIBS += -L$(QPEDIR)/lib 13LIBS += -L$(QPEDIR)/lib
14DEFINES += KAB_EMBEDDED 14DEFINES += KAB_EMBEDDED
15 15
16#enable the following line if you want to get debugoutput while loading adresses 16#enable the following line if you want to get debugoutput while loading adresses
17#DEFINES += VCARD_DEBUG 17#DEFINES += VCARD_DEBUG
18 18
19INTERFACES = \ 19INTERFACES = \
20 20
21HEADERS = \ 21HEADERS = \
22 address.h \ 22 address.h \
23 addressbook.h \ 23 addressbook.h \
@@ -185,12 +185,14 @@ vcard/SoundValue.cpp \
185vcard/AgentValue.cpp \ 185vcard/AgentValue.cpp \
186vcard/TelValue.cpp \ 186vcard/TelValue.cpp \
187vcard/TextBinValue.cpp \ 187vcard/TextBinValue.cpp \
188vcard/OrgValue.cpp \ 188vcard/OrgValue.cpp \
189vcard/UTCValue.cpp \ 189vcard/UTCValue.cpp \
190vcard/ClassValue.cpp \ 190vcard/ClassValue.cpp \
191vcard/FloatValue.cpp \ 191vcard/FloatValue.cpp \
192vcard/TextListValue.cpp 192vcard/TextListValue.cpp
193 193
194 194
195# plugins/ldap/resourceldap.cpp \ 195# plugins/ldap/resourceldap.cpp \
196# plugins/ldap/resourceldapconfig.cpp \ 196# plugins/ldap/resourceldapconfig.cpp \
197#The following line was inserted by qt3to4
198QT += qt3support
diff --git a/kabc/key.h b/kabc/key.h
index 6ea5b47..313eb7d 100644
--- a/kabc/key.h
+++ b/kabc/key.h
@@ -19,39 +19,39 @@
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_KEY_H 28#ifndef KABC_KEY_H
29#define KABC_KEY_H 29#define KABC_KEY_H
30 30
31#include <qvaluelist.h> 31#include <q3valuelist.h>
32 32
33namespace KABC { 33namespace KABC {
34 34
35/** 35/**
36 * @short A class to store an encryption key. 36 * @short A class to store an encryption key.
37 */ 37 */
38class Key 38class Key
39{ 39{
40 friend QDataStream &operator<<( QDataStream &, const Key & ); 40 friend QDataStream &operator<<( QDataStream &, const Key & );
41 friend QDataStream &operator>>( QDataStream &, Key & ); 41 friend QDataStream &operator>>( QDataStream &, Key & );
42 42
43public: 43public:
44 typedef QValueList<Key> List; 44 typedef Q3ValueList<Key> List;
45 typedef QValueList<int> TypeList; 45 typedef Q3ValueList<int> TypeList;
46 46
47 /** 47 /**
48 * Key types 48 * Key types
49 * 49 *
50 * @li X509 - X509 key 50 * @li X509 - X509 key
51 * @li PGP - Pretty Good Privacy key 51 * @li PGP - Pretty Good Privacy key
52 * @li Custom - Custom or IANA conform key 52 * @li Custom - Custom or IANA conform key
53 */ 53 */
54 enum Types { 54 enum Types {
55 X509, 55 X509,
56 PGP, 56 PGP,
57 Custom 57 Custom
diff --git a/kabc/phonenumber.h b/kabc/phonenumber.h
index feeba6c..6bc89d3 100644
--- a/kabc/phonenumber.h
+++ b/kabc/phonenumber.h
@@ -19,44 +19,44 @@
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_PHONENUMBER_H 28#ifndef KABC_PHONENUMBER_H
29#define KABC_PHONENUMBER_H 29#define KABC_PHONENUMBER_H
30 30
31#include <qvaluelist.h> 31#include <q3valuelist.h>
32#include <qstring.h> 32#include <qstring.h>
33 33
34namespace KABC { 34namespace KABC {
35 35
36/** 36/**
37 @short Phonenumber information. 37 @short Phonenumber information.
38 38
39 This class provides phone number information. A phone number is classified by 39 This class provides phone number information. A phone number is classified by
40 a type. The following types are available, it's possible to use multiple types 40 a type. The following types are available, it's possible to use multiple types
41 @ref Types for a number by combining them through a logical or. 41 @ref Types for a number by combining them through a logical or.
42*/ 42*/
43class PhoneNumber 43class PhoneNumber
44{ 44{
45 friend QDataStream &operator<<( QDataStream &, const PhoneNumber & ); 45 friend QDataStream &operator<<( QDataStream &, const PhoneNumber & );
46 friend QDataStream &operator>>( QDataStream &, PhoneNumber & ); 46 friend QDataStream &operator>>( QDataStream &, PhoneNumber & );
47 47
48 public: 48 public:
49 typedef QValueList<PhoneNumber> List; 49 typedef Q3ValueList<PhoneNumber> List;
50 typedef QValueList<int> TypeList; 50 typedef Q3ValueList<int> TypeList;
51 51
52 /** 52 /**
53 @li @p Home - Home number 53 @li @p Home - Home number
54 @li @p Work - Office number 54 @li @p Work - Office number
55 @li @p Msg - Messaging 55 @li @p Msg - Messaging
56 @li @p Pref - Preferred number 56 @li @p Pref - Preferred number
57 @li @p Voice - Voice 57 @li @p Voice - Voice
58 @li @p Fax - Fax machine 58 @li @p Fax - Fax machine
59 @li @p Cell - Cell phone 59 @li @p Cell - Cell phone
60 @li @p Video - Video phone 60 @li @p Video - Video phone
61 @li @p Bbs - Mailbox 61 @li @p Bbs - Mailbox
62 @li @p Modem - Modem 62 @li @p Modem - Modem
diff --git a/kabc/picture.cpp b/kabc/picture.cpp
index 57aa297..0c59937 100644
--- a/kabc/picture.cpp
+++ b/kabc/picture.cpp
@@ -17,24 +17,26 @@
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include "picture.h" 28#include "picture.h"
29//Added by qt3to4:
30#include <QPixmap>
29 31
30using namespace KABC; 32using namespace KABC;
31 33
32Picture::Picture() 34Picture::Picture()
33 : mIntern( false ) 35 : mIntern( false )
34{ 36{
35 mUndefined = true; 37 mUndefined = true;
36} 38}
37 39
38Picture::Picture( const QString &url ) 40Picture::Picture( const QString &url )
39 : mUrl( url ), mIntern( false ) 41 : mUrl( url ), mIntern( false )
40{ 42{
diff --git a/kabc/picture.h b/kabc/picture.h
index 714d1e2..1b63610 100644
--- a/kabc/picture.h
+++ b/kabc/picture.h
@@ -20,24 +20,26 @@
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_PICTURE_H 28#ifndef KABC_PICTURE_H
29#define KABC_PICTURE_H 29#define KABC_PICTURE_H
30 30
31#include <qimage.h> 31#include <qimage.h>
32//Added by qt3to4:
33#include <QPixmap>
32 34
33namespace KABC { 35namespace KABC {
34 36
35class Picture 37class Picture
36{ 38{
37 friend QDataStream &operator<<( QDataStream &, const Picture & ); 39 friend QDataStream &operator<<( QDataStream &, const Picture & );
38 friend QDataStream &operator>>( QDataStream &, Picture & ); 40 friend QDataStream &operator>>( QDataStream &, Picture & );
39 41
40public: 42public:
41 43
42 /** 44 /**
43 * Consturctor. Creates an empty object. 45 * Consturctor. Creates an empty object.
diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro
index 3e18594..9b3b894 100644
--- a/kabc/plugins/dir/dir.pro
+++ b/kabc/plugins/dir/dir.pro
@@ -1,36 +1,40 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5include( ../../../variables.pri ) 5include( ../../../variables.pri )
6 6
7TARGET = microkabc_dir 7TARGET = xmicrokabc_dir
8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat 8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
9DESTDIR = ../../../bin 9DESTDIR = ../../../bin
10#LIBS += -lmicrokde -lmicrokabc 10#LIBS += -lxmicrokde -lxmicrokabc
11#LIBS += -L$(QPEDIR)/lib 11#LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
14 14
15HEADERS = \ 15HEADERS = \
16 resourcedir.h \ 16 resourcedir.h \
17 resourcedirconfig.h 17 resourcedirconfig.h
18 18
19SOURCES = \ 19SOURCES = \
20 resourcedir.cpp \ 20 resourcedir.cpp \
21 resourcedirconfig.cpp 21 resourcedirconfig.cpp
22 22
23unix : { 23unix : {
24OBJECTS_DIR = obj/unix 24OBJECTS_DIR = obj/unix
25MOC_DIR = moc/unix 25MOC_DIR = moc/unix
26} 26}
27win32: { 27win32: {
28CONFIG += dll 28CONFIG += dll
29DEFINES += _WIN32_ 29DEFINES += _WIN32_
30OBJECTS_DIR = obj/win 30OBJECTS_DIR = obj/win
31MOC_DIR = moc/win 31MOC_DIR = moc/win
32LIBS += ../../../bin/microkdepim.lib 32LIBS += ../../../bin/xmicrokdepim.lib
33LIBS += ../../../bin/microkcal.lib 33LIBS += ../../../bin/xmicrokcal.lib
34LIBS += ../../../bin/microkde.lib 34LIBS += ../../../bin/xmicrokde.lib
35LIBS += ../../../bin/microkabc.lib 35LIBS += ../../../bin/microkabc.lib
36} 36}
37#The following line was inserted by qt3to4
38QT += qt3support
39#The following line was inserted by qt3to4
40QT += xml
diff --git a/kabc/plugins/dir/dirE.pro b/kabc/plugins/dir/dirE.pro
index cda4e2f..75332a0 100644
--- a/kabc/plugins/dir/dirE.pro
+++ b/kabc/plugins/dir/dirE.pro
@@ -1,21 +1,21 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5TARGET = microkabc_dir 5TARGET = xmicrokabc_dir
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde -lmicrokabc 10LIBS += -lxmicrokde -lxmicrokabc
11LIBS += -L$(QPEDIR)/lib 11LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
14 14
15HEADERS = \ 15HEADERS = \
16 resourcedir.h \ 16 resourcedir.h \
17 resourcedirconfig.h 17 resourcedirconfig.h
18 18
19SOURCES = \ 19SOURCES = \
20 resourcedir.cpp \ 20 resourcedir.cpp \
21 resourcedirconfig.cpp 21 resourcedirconfig.cpp
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index c61664b..cc4afee 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -161,25 +161,25 @@ Ticket *ResourceDir::requestSaveTicket()
161 161
162bool ResourceDir::doOpen() 162bool ResourceDir::doOpen()
163{ 163{
164 QDir dir( mPath ); 164 QDir dir( mPath );
165 if ( !dir.exists() ) { // no directory available 165 if ( !dir.exists() ) { // no directory available
166 return dir.mkdir( dir.path() ); 166 return dir.mkdir( dir.path() );
167 } else { 167 } else {
168 QString testName = dir.entryList( QDir::Files )[0]; 168 QString testName = dir.entryList( QDir::Files )[0];
169 if ( testName.isNull() || testName.isEmpty() ) // no file in directory 169 if ( testName.isNull() || testName.isEmpty() ) // no file in directory
170 return true; 170 return true;
171 171
172 QFile file( mPath + "/" + testName ); 172 QFile file( mPath + "/" + testName );
173 if ( file.open( IO_ReadOnly ) ) 173 if ( file.open( QIODevice::ReadOnly ) )
174 return true; 174 return true;
175 175
176 if ( file.size() == 0 ) 176 if ( file.size() == 0 )
177 return true; 177 return true;
178 178
179 bool ok = mFormat->checkFormat( &file ); 179 bool ok = mFormat->checkFormat( &file );
180 file.close(); 180 file.close();
181 return ok; 181 return ok;
182 } 182 }
183} 183}
184 184
185void ResourceDir::doClose() 185void ResourceDir::doClose()
@@ -187,25 +187,25 @@ void ResourceDir::doClose()
187} 187}
188 188
189bool ResourceDir::load() 189bool ResourceDir::load()
190{ 190{
191 QDir dir( mPath ); 191 QDir dir( mPath );
192 QStringList files = dir.entryList( QDir::Files ); 192 QStringList files = dir.entryList( QDir::Files );
193 193
194 QStringList::Iterator it; 194 QStringList::Iterator it;
195 bool ok = true; 195 bool ok = true;
196 for ( it = files.begin(); it != files.end(); ++it ) { 196 for ( it = files.begin(); it != files.end(); ++it ) {
197 QFile file( mPath + "/" + (*it) ); 197 QFile file( mPath + "/" + (*it) );
198 198
199 if ( !file.open( IO_ReadOnly ) ) { 199 if ( !file.open( QIODevice::ReadOnly ) ) {
200 addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); 200 addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) );
201 ok = false; 201 ok = false;
202 continue; 202 continue;
203 } 203 }
204 204
205 if ( !mFormat->loadAll( addressBook(), this, &file ) ) 205 if ( !mFormat->loadAll( addressBook(), this, &file ) )
206 ok = false; 206 ok = false;
207 207
208 file.close(); 208 file.close();
209 } 209 }
210 210
211 return ok; 211 return ok;
@@ -214,25 +214,25 @@ bool ResourceDir::load()
214bool ResourceDir::save( Ticket *ticket ) 214bool ResourceDir::save( Ticket *ticket )
215{ 215{
216 AddressBook::Iterator it; 216 AddressBook::Iterator it;
217 bool ok = true; 217 bool ok = true;
218#ifndef NO_DIRWATCH 218#ifndef NO_DIRWATCH
219 mDirWatch.stopScan(); 219 mDirWatch.stopScan();
220#endif 220#endif
221 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { 221 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
222 if ( (*it).resource() != this || !(*it).changed() ) 222 if ( (*it).resource() != this || !(*it).changed() )
223 continue; 223 continue;
224 224
225 QFile file( mPath + "/" + (*it).uid() ); 225 QFile file( mPath + "/" + (*it).uid() );
226 if ( !file.open( IO_WriteOnly ) ) { 226 if ( !file.open( QIODevice::WriteOnly ) ) {
227 addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); 227 addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) );
228 continue; 228 continue;
229 } 229 }
230 230
231 mFormat->save( *it, &file ); 231 mFormat->save( *it, &file );
232 232
233 // mark as unchanged 233 // mark as unchanged
234 (*it).setChanged( false ); 234 (*it).setChanged( false );
235 235
236 file.close(); 236 file.close();
237 } 237 }
238#ifndef NO_DIRWATCH 238#ifndef NO_DIRWATCH
@@ -258,25 +258,25 @@ bool ResourceDir::lock( const QString &path )
258 258
259 if ( QFile::exists( lockName ) ) return false; 259 if ( QFile::exists( lockName ) ) return false;
260 260
261 QString lockUniqueName; 261 QString lockUniqueName;
262 lockUniqueName = p + KApplication::randomString( 8 ); 262 lockUniqueName = p + KApplication::randomString( 8 );
263 263
264 url = lockUniqueName; 264 url = lockUniqueName;
265//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); 265//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName );
266 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); 266 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() );
267 267
268 // Create unique file 268 // Create unique file
269 QFile file( mLockUniqueName ); 269 QFile file( mLockUniqueName );
270 file.open( IO_WriteOnly ); 270 file.open( QIODevice::WriteOnly );
271 file.close(); 271 file.close();
272 272
273 // Create lock file 273 // Create lock file
274 int result = 0; 274 int result = 0;
275#ifndef _WIN32_ 275#ifndef _WIN32_
276 result = ::link( QFile::encodeName( mLockUniqueName ), 276 result = ::link( QFile::encodeName( mLockUniqueName ),
277 QFile::encodeName( lockName ) ); 277 QFile::encodeName( lockName ) );
278#endif 278#endif
279 if ( result == 0 ) { 279 if ( result == 0 ) {
280 addressBook()->emitAddressBookLocked(); 280 addressBook()->emitAddressBookLocked();
281 return true; 281 return true;
282 } 282 }
diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp
index 98d18fe..8fa48d0 100644
--- a/kabc/plugins/dir/resourcedirconfig.cpp
+++ b/kabc/plugins/dir/resourcedirconfig.cpp
@@ -18,42 +18,44 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30//Added by qt3to4:
31#include <Q3GridLayout>
30 32
31#include <kdebug.h> 33#include <kdebug.h>
32#include <klocale.h> 34#include <klocale.h>
33#include <kstandarddirs.h> 35#include <kstandarddirs.h>
34#include <kdialog.h> 36#include <kdialog.h>
35 37
36//US #include "formatfactory.h" 38//US #include "formatfactory.h"
37#include "resourcedir.h" 39#include "resourcedir.h"
38#include "stdaddressbook.h" 40#include "stdaddressbook.h"
39 41
40#include "resourcedirconfig.h" 42#include "resourcedirconfig.h"
41 43
42using namespace KABC; 44using namespace KABC;
43 45
44ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name ) 46ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
45 : KRES::ConfigWidget( parent, name ) 47 : KRES::ConfigWidget( parent, name )
46{ 48{
47 QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, 49 Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0,
48 KDialog::spacingHint() ); 50 KDialog::spacingHint() );
49 51
50 QLabel *label = new QLabel( i18n( "Format:" ), this ); 52 QLabel *label = new QLabel( i18n( "Format:" ), this );
51 mFormatBox = new KComboBox( this ); 53 mFormatBox = new KComboBox( this );
52 54
53 mainLayout->addWidget( label, 0, 0 ); 55 mainLayout->addWidget( label, 0, 0 );
54 mainLayout->addWidget( mFormatBox, 0, 1 ); 56 mainLayout->addWidget( mFormatBox, 0, 1 );
55 57
56 label = new QLabel( i18n( "Location:" ), this ); 58 label = new QLabel( i18n( "Location:" ), this );
57 mFileNameEdit = new KURLRequester( this ); 59 mFileNameEdit = new KURLRequester( this );
58//US mFileNameEdit->setMode( KFile::Directory ); 60//US mFileNameEdit->setMode( KFile::Directory );
59 61
diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro
index 2d17313..e4f1270 100644
--- a/kabc/plugins/file/file.pro
+++ b/kabc/plugins/file/file.pro
@@ -1,37 +1,41 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5include( ../../../variables.pri ) 5include( ../../../variables.pri )
6 6
7TARGET = microkabc_file 7TARGET = xmicrokabc_file
8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat 8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
9 9
10DESTDIR = ../../../bin 10DESTDIR = ../../../bin
11#LIBS += -lmicrokde -lmicrokabc 11#LIBS += -lxmicrokde -lxmicrokabc
12#LIBS += -L$(QPEDIR)/lib 12#LIBS += -L$(QPEDIR)/lib
13 13
14INTERFACES = \ 14INTERFACES = \
15 15
16HEADERS = \ 16HEADERS = \
17 resourcefile.h \ 17 resourcefile.h \
18 resourcefileconfig.h 18 resourcefileconfig.h
19 19
20SOURCES = \ 20SOURCES = \
21 resourcefile.cpp \ 21 resourcefile.cpp \
22 resourcefileconfig.cpp 22 resourcefileconfig.cpp
23 23
24unix : { 24unix : {
25OBJECTS_DIR = obj/unix 25OBJECTS_DIR = obj/unix
26MOC_DIR = moc/unix 26MOC_DIR = moc/unix
27} 27}
28win32: { 28win32: {
29CONFIG += dll 29CONFIG += dll
30DEFINES += _WIN32_ 30DEFINES += _WIN32_
31OBJECTS_DIR = obj/win 31OBJECTS_DIR = obj/win
32MOC_DIR = moc/win 32MOC_DIR = moc/win
33LIBS += ../../../bin/microkdepim.lib 33LIBS += ../../../bin/xmicrokdepim.lib
34LIBS += ../../../bin/microkcal.lib 34LIBS += ../../../bin/xmicrokcal.lib
35LIBS += ../../../bin/microkde.lib 35LIBS += ../../../bin/xmicrokde.lib
36LIBS += ../../../bin/microkabc.lib 36LIBS += ../../../bin/microkabc.lib
37} 37}
38#The following line was inserted by qt3to4
39QT += qt3support
40#The following line was inserted by qt3to4
41QT += xml
diff --git a/kabc/plugins/file/fileE.pro b/kabc/plugins/file/fileE.pro
index 16707e5..5044cd9 100644
--- a/kabc/plugins/file/fileE.pro
+++ b/kabc/plugins/file/fileE.pro
@@ -1,21 +1,21 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5TARGET = microkabc_file 5TARGET = xmicrokabc_file
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde -lmicrokabc 10LIBS += -lxmicrokde -lxmicrokabc
11LIBS += -L$(QPEDIR)/lib 11LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
14 14
15HEADERS = \ 15HEADERS = \
16 resourcefile.h \ 16 resourcefile.h \
17 resourcefileconfig.h 17 resourcefileconfig.h
18 18
19SOURCES = \ 19SOURCES = \
20 resourcefile.cpp \ 20 resourcefile.cpp \
21 resourcefileconfig.cpp 21 resourcefileconfig.cpp
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index dad4571..3ed850c 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -192,54 +192,54 @@ Ticket *ResourceFile::requestSaveTicket()
192#endif 192#endif
193 return createTicket( this ); 193 return createTicket( this );
194} 194}
195 195
196 196
197bool ResourceFile::doOpen() 197bool ResourceFile::doOpen()
198{ 198{
199 QFile file( fileName() ); 199 QFile file( fileName() );
200 qDebug("ResourceFile::openfile %s ", fileName().latin1()); 200 qDebug("ResourceFile::openfile %s ", fileName().latin1());
201 201
202 if ( !file.exists() ) { 202 if ( !file.exists() ) {
203 // try to create the file 203 // try to create the file
204 bool ok = file.open( IO_WriteOnly ); 204 bool ok = file.open( QIODevice::WriteOnly );
205 if ( ok ) 205 if ( ok )
206 file.close(); 206 file.close();
207 207
208 return ok; 208 return ok;
209 } else { 209 } else {
210 if ( !file.open( IO_ReadWrite ) ) 210 if ( !file.open( QIODevice::ReadWrite ) )
211 return false; 211 return false;
212 212
213 if ( file.size() < 10 ) { 213 if ( file.size() < 10 ) {
214 file.close(); 214 file.close();
215 return true; 215 return true;
216 } 216 }
217 217
218 bool ok = mFormat->checkFormat( &file ); 218 bool ok = mFormat->checkFormat( &file );
219 file.close(); 219 file.close();
220 220
221 return ok; 221 return ok;
222 } 222 }
223} 223}
224 224
225void ResourceFile::doClose() 225void ResourceFile::doClose()
226{ 226{
227} 227}
228 228
229bool ResourceFile::load() 229bool ResourceFile::load()
230{ 230{
231 231
232 QFile file( fileName() ); 232 QFile file( fileName() );
233 if ( !file.open( IO_ReadOnly ) ) { 233 if ( !file.open( QIODevice::ReadOnly ) ) {
234 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); 234 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) );
235 return false; 235 return false;
236 } 236 }
237 237
238// qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1()); 238// qDebug("ResourceFile::load format %s, %s", mFileName.latin1(), mFormatName.latin1());
239 239
240 return mFormat->loadAll( addressBook(), this, &file ); 240 return mFormat->loadAll( addressBook(), this, &file );
241} 241}
242 242
243bool ResourceFile::save( Ticket *ticket ) 243bool ResourceFile::save( Ticket *ticket )
244{ 244{
245// qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); 245// qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1());
@@ -302,25 +302,25 @@ bool ResourceFile::save( Ticket *ticket )
302 conf.writeEntry( "mBackupEnabled", false ); 302 conf.writeEntry( "mBackupEnabled", false );
303 } 303 }
304 if ( saveDate ) { 304 if ( saveDate ) {
305 KConfig config ( locateLocal("config","kabcrc") ); 305 KConfig config ( locateLocal("config","kabcrc") );
306 config.setGroup( "Resource_" + identifier() ); 306 config.setGroup( "Resource_" + identifier() );
307 config.writeEntry( "LastBackupDate", mLastBackupDate ); 307 config.writeEntry( "LastBackupDate", mLastBackupDate );
308 } 308 }
309 } 309 }
310 } 310 }
311 } 311 }
312 QFile info; 312 QFile info;
313 info.setName( fileName() ); 313 info.setName( fileName() );
314 bool ok = info.open( IO_WriteOnly ); 314 bool ok = info.open( QIODevice::WriteOnly );
315 if ( ok ) { 315 if ( ok ) {
316 mFormat->saveAll( addressBook(), this, &info ); 316 mFormat->saveAll( addressBook(), this, &info );
317 317
318 info.close(); 318 info.close();
319 ok = true; 319 ok = true;
320 } 320 }
321 else { 321 else {
322 322
323 } 323 }
324 324
325 if ( !ok ) 325 if ( !ok )
326 addressBook()->error( i18n( "Unable to save file '%1'." ).arg( fileName() ) ); 326 addressBook()->error( i18n( "Unable to save file '%1'." ).arg( fileName() ) );
@@ -354,25 +354,25 @@ bool ResourceFile::lock( const QString &fileName )
354 if (QFile::exists( lockName )) return false; 354 if (QFile::exists( lockName )) return false;
355 355
356 QString lockUniqueName; 356 QString lockUniqueName;
357 lockUniqueName = fn + KApplication::randomString( 8 ); 357 lockUniqueName = fn + KApplication::randomString( 8 );
358 358
359 url = lockUniqueName; 359 url = lockUniqueName;
360//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); 360//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName );
361 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); 361 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() );
362 kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; 362 kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl;
363 363
364 // Create unique file 364 // Create unique file
365 QFile file( mLockUniqueName ); 365 QFile file( mLockUniqueName );
366 file.open( IO_WriteOnly ); 366 file.open( QIODevice::WriteOnly );
367 file.close(); 367 file.close();
368 368
369 // Create lock file 369 // Create lock file
370 int result = 0; 370 int result = 0;
371#ifndef _WIN32_ 371#ifndef _WIN32_
372 result = ::link( QFile::encodeName( mLockUniqueName ), 372 result = ::link( QFile::encodeName( mLockUniqueName ),
373 QFile::encodeName( lockName ) ); 373 QFile::encodeName( lockName ) );
374#endif 374#endif
375 if ( result == 0 ) { 375 if ( result == 0 ) {
376 addressBook()->emitAddressBookLocked(); 376 addressBook()->emitAddressBookLocked();
377 return true; 377 return true;
378 } 378 }
diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp
index b63775d..70b0bac 100644
--- a/kabc/plugins/file/resourcefileconfig.cpp
+++ b/kabc/plugins/file/resourcefileconfig.cpp
@@ -19,47 +19,49 @@
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qfileinfo.h> 30#include <qfileinfo.h>
31//Added by qt3to4:
32#include <Q3GridLayout>
31 33
32#include <kdebug.h> 34#include <kdebug.h>
33#include <klocale.h> 35#include <klocale.h>
34#include <kstandarddirs.h> 36#include <kstandarddirs.h>
35#include <kdialog.h> 37#include <kdialog.h>
36#ifndef _WIN32_ 38#ifndef _WIN32_
37#include <unistd.h> 39#include <unistd.h>
38#endif 40#endif
39//US #include "formatfactory.h" 41//US #include "formatfactory.h"
40#include <qfile.h> 42#include <qfile.h>
41#include "resourcefile.h" 43#include "resourcefile.h"
42#include "stdaddressbook.h" 44#include "stdaddressbook.h"
43 45
44#include "resourcefileconfig.h" 46#include "resourcefileconfig.h"
45 47
46using namespace KABC; 48using namespace KABC;
47 49
48ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name ) 50ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name )
49 : ConfigWidget( parent, name ) 51 : ConfigWidget( parent, name )
50{ 52{
51//qDebug("ResourceFileConfig::ResourceFileConfig"); 53//qDebug("ResourceFileConfig::ResourceFileConfig");
52 54
53 QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, 55 Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0,
54 KDialog::spacingHint() ); 56 KDialog::spacingHint() );
55 57
56 QLabel *label = new QLabel( i18n( "Format:" ), this ); 58 QLabel *label = new QLabel( i18n( "Format:" ), this );
57 mFormatBox = new KComboBox( this ); 59 mFormatBox = new KComboBox( this );
58 60
59 mainLayout->addWidget( label, 0, 0 ); 61 mainLayout->addWidget( label, 0, 0 );
60 mainLayout->addWidget( mFormatBox, 0, 1 ); 62 mainLayout->addWidget( mFormatBox, 0, 1 );
61 63
62 label = new QLabel( i18n( "Location:" ), this ); 64 label = new QLabel( i18n( "Location:" ), this );
63 mFileNameEdit = new KURLRequester( this ); 65 mFileNameEdit = new KURLRequester( this );
64 66
65 connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ), 67 connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ),
diff --git a/kabc/plugins/ldap/ldapE.pro b/kabc/plugins/ldap/ldapE.pro
index 57b6f84..c56d24d 100644
--- a/kabc/plugins/ldap/ldapE.pro
+++ b/kabc/plugins/ldap/ldapE.pro
@@ -1,21 +1,21 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5TARGET = microkabc_ldap 5TARGET = xmicrokabc_ldap
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde -lmicrokabc 10LIBS += -lxmicrokde -lxmicrokabc
11LIBS += -L$(QPEDIR)/lib 11LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
14 14
15HEADERS = \ 15HEADERS = \
16 resourceldap.h \ 16 resourceldap.h \
17 resourceldapconfig.h 17 resourceldapconfig.h
18 18
19SOURCES = \ 19SOURCES = \
20 resourceldap.cpp \ 20 resourceldap.cpp \
21 resourceldapconfig.cpp 21 resourceldapconfig.cpp
diff --git a/kabc/plugins/olaccess/olaccess.pro b/kabc/plugins/olaccess/olaccess.pro
index 9b95015..ad7e1ef 100644
--- a/kabc/plugins/olaccess/olaccess.pro
+++ b/kabc/plugins/olaccess/olaccess.pro
@@ -1,15 +1,15 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3TARGET = microkabc_olaccess 3TARGET = xmicrokabc_olaccess
4 4
5include( ../../../variables.pri ) 5include( ../../../variables.pri )
6 6
7INCLUDEPATH += ../../.. ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat 7INCLUDEPATH += ../../.. ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
8 8
9INTERFACES = \ 9INTERFACES = \
10 10
11DESTDIR = ../../../bin 11DESTDIR = ../../../bin
12HEADERS = \ 12HEADERS = \
13 resourceolaccess.h \ 13 resourceolaccess.h \
14 resourceolaccessconfig.h \ 14 resourceolaccessconfig.h \
15 olaccessconverter.h 15 olaccessconverter.h
@@ -19,17 +19,17 @@ SOURCES = \
19 resourceolaccessconfig.cpp \ 19 resourceolaccessconfig.cpp \
20 olaccessconverter.cpp 20 olaccessconverter.cpp
21 21
22unix : { 22unix : {
23OBJECTS_DIR = obj/unix 23OBJECTS_DIR = obj/unix
24MOC_DIR = moc/unix 24MOC_DIR = moc/unix
25} 25}
26win32: { 26win32: {
27CONFIG += dll 27CONFIG += dll
28DEFINES += _WIN32_ 28DEFINES += _WIN32_
29OBJECTS_DIR = obj/win 29OBJECTS_DIR = obj/win
30MOC_DIR = moc/win 30MOC_DIR = moc/win
31LIBS += ../../../bin/microkdepim.lib 31LIBS += ../../../bin/xmicrokdepim.lib
32LIBS += ../../../bin/microkcal.lib 32LIBS += ../../../bin/xmicrokcal.lib
33LIBS += ../../../bin/microkde.lib 33LIBS += ../../../bin/xmicrokde.lib
34LIBS += ../../../bin/microkabc.lib 34LIBS += ../../../bin/microkabc.lib
35} 35}
diff --git a/kabc/plugins/opie/opieE.pro b/kabc/plugins/opie/opieE.pro
index b7ecbc0..aa6b8ea 100644
--- a/kabc/plugins/opie/opieE.pro
+++ b/kabc/plugins/opie/opieE.pro
@@ -1,25 +1,25 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3#release debug 3#release debug
4TARGET = microkabc_opie 4TARGET = xmicrokabc_opie
5 5
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include $(OPIEDIR)/include 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include $(OPIEDIR)/include
7 7
8 8
9OBJECTS_DIR = obj/$(PLATFORM) 9OBJECTS_DIR = obj/$(PLATFORM)
10MOC_DIR = moc/$(PLATFORM) 10MOC_DIR = moc/$(PLATFORM)
11DESTDIR = $(QPEDIR)/lib 11DESTDIR = $(QPEDIR)/lib
12LIBS += -lmicrokde 12LIBS += -lxmicrokde
13LIBS += -lmicrokabc 13LIBS += -lxmicrokabc
14LIBS += -L$(QPEDIR)/lib 14LIBS += -L$(QPEDIR)/lib
15LIBS += -L$(OPIEDIR)/lib 15LIBS += -L$(OPIEDIR)/lib
16LIBS += -lopie 16LIBS += -lopie
17LIBS += -lqpe 17LIBS += -lqpe
18LIBS += -lqte 18LIBS += -lqte
19 19
20INTERFACES = \ 20INTERFACES = \
21 21
22HEADERS = \ 22HEADERS = \
23 resourceopie.h \ 23 resourceopie.h \
24 resourceopieconfig.h \ 24 resourceopieconfig.h \
25 opieconverter.h \ 25 opieconverter.h \
diff --git a/kabc/plugins/qtopia/qtopia.pro b/kabc/plugins/qtopia/qtopia.pro
index 64d1abc..d91a2e3 100644
--- a/kabc/plugins/qtopia/qtopia.pro
+++ b/kabc/plugins/qtopia/qtopia.pro
@@ -1,24 +1,24 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3 3
4include( ../../../variables.pri ) 4include( ../../../variables.pri )
5 5
6TARGET = microkabc_qtopia 6TARGET = xmicrokabc_qtopia
7 7
8INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources 8INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources
9 9
10DESTDIR = ../../../bin 10DESTDIR = ../../../bin
11#LIBS += -lmicrokde 11#LIBS += -lxmicrokde
12#LIBS += -lkamicrokabc 12#LIBS += -lxkamicrokabc
13 13
14DEFINES += KAB_EMBEDDED DESKTOP_VERSION 14DEFINES += KAB_EMBEDDED DESKTOP_VERSION
15 15
16INTERFACES = \ 16INTERFACES = \
17 17
18HEADERS = \ 18HEADERS = \
19 resourceqtopia.h \ 19 resourceqtopia.h \
20 resourceqtopiaconfig.h \ 20 resourceqtopiaconfig.h \
21 qtopiaconverter.h 21 qtopiaconverter.h
22 22
23SOURCES = \ 23SOURCES = \
24 resourceqtopia.cpp \ 24 resourceqtopia.cpp \
@@ -27,17 +27,21 @@ SOURCES = \
27 27
28 28
29 29
30unix : { 30unix : {
31OBJECTS_DIR = obj/unix 31OBJECTS_DIR = obj/unix
32MOC_DIR = moc/unix 32MOC_DIR = moc/unix
33} 33}
34win32: { 34win32: {
35CONFIG += dll 35CONFIG += dll
36DEFINES += _WIN32_ 36DEFINES += _WIN32_
37OBJECTS_DIR = obj/win 37OBJECTS_DIR = obj/win
38MOC_DIR = moc/win 38MOC_DIR = moc/win
39LIBS += ../../../bin/microkdepim.lib 39LIBS += ../../../bin/xmicrokdepim.lib
40LIBS += ../../../bin/microkcal.lib 40LIBS += ../../../bin/xmicrokcal.lib
41LIBS += ../../../bin/microkde.lib 41LIBS += ../../../bin/xmicrokde.lib
42LIBS += ../../../bin/microkabc.lib 42LIBS += ../../../bin/microkabc.lib
43} 43}
44#The following line was inserted by qt3to4
45QT += xml qt3support
46#The following line was inserted by qt3to4
47QT +=
diff --git a/kabc/plugins/qtopia/qtopiaE.pro b/kabc/plugins/qtopia/qtopiaE.pro
index 700057b..4b174b2 100644
--- a/kabc/plugins/qtopia/qtopiaE.pro
+++ b/kabc/plugins/qtopia/qtopiaE.pro
@@ -1,24 +1,24 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3 3
4TARGET = microkabc_qtopia 4TARGET = xmicrokabc_qtopia
5 5
6INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 6INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
7 7
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
10DESTDIR = $(QPEDIR)/lib 10DESTDIR = $(QPEDIR)/lib
11LIBS += -lmicrokde 11LIBS += -lxmicrokde
12LIBS += -lmicrokabc 12LIBS += -lxmicrokabc
13LIBS += -L$(QPEDIR)/lib 13LIBS += -L$(QPEDIR)/lib
14LIBS += -lqpe 14LIBS += -lqpe
15 15
16INTERFACES = \ 16INTERFACES = \
17 17
18HEADERS = \ 18HEADERS = \
19 resourceqtopia.h \ 19 resourceqtopia.h \
20 resourceqtopiaconfig.h \ 20 resourceqtopiaconfig.h \
21 qtopiaconverter.h 21 qtopiaconverter.h
22 22
23SOURCES = \ 23SOURCES = \
24 resourceqtopia.cpp \ 24 resourceqtopia.cpp \
diff --git a/kabc/plugins/qtopia/qtopiaconverter.cpp b/kabc/plugins/qtopia/qtopiaconverter.cpp
index 9693a68..9b3903b 100644
--- a/kabc/plugins/qtopia/qtopiaconverter.cpp
+++ b/kabc/plugins/qtopia/qtopiaconverter.cpp
@@ -25,25 +25,27 @@ Copyright (c) 2004 Ulf Schenk
25$Id$ 25$Id$
26*/ 26*/
27 27
28//US 28//US
29#include "kglobal.h" 29#include "kglobal.h"
30#include "klocale.h" 30#include "klocale.h"
31 31
32 32
33#include "qtopiaconverter.h" 33#include "qtopiaconverter.h"
34 34
35#include <qfile.h> 35#include <qfile.h>
36#include <qdir.h> 36#include <qdir.h>
37#include <qtextstream.h> 37#include <q3textstream.h>
38//Added by qt3to4:
39#include <Q3ValueList>
38//#include <.h> 40//#include <.h>
39 41
40#include <libkdepim/ksyncprofile.h> 42#include <libkdepim/ksyncprofile.h>
41 43
42 44
43using namespace KABC; 45using namespace KABC;
44 46
45QtopiaConverter::QtopiaConverter() 47QtopiaConverter::QtopiaConverter()
46{ 48{
47 m_edit = 0; 49 m_edit = 0;
48} 50}
49 51
@@ -62,26 +64,26 @@ bool QtopiaConverter::init()
62void QtopiaConverter::deinit() 64void QtopiaConverter::deinit()
63{ 65{
64 if (m_edit) 66 if (m_edit)
65 { 67 {
66 delete m_edit; 68 delete m_edit;
67 m_edit = 0; 69 m_edit = 0;
68 } 70 }
69} 71}
70QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QString &app ) 72QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QString &app )
71{ 73{
72 startover: 74 startover:
73 QStringList dummy; 75 QStringList dummy;
74 QValueList<OpieCategories>::ConstIterator catIt; 76 Q3ValueList<OpieCategories>::ConstIterator catIt;
75 QValueList<OpieCategories> categories = m_edit->categories(); 77 Q3ValueList<OpieCategories> categories = m_edit->categories();
76 bool found = false; 78 bool found = false;
77 for ( QStringList::ConstIterator listIt = list.begin(); listIt != list.end(); ++listIt ) { 79 for ( QStringList::ConstIterator listIt = list.begin(); listIt != list.end(); ++listIt ) {
78 /* skip empty category name */ 80 /* skip empty category name */
79 if ( (*listIt).isEmpty() ) continue; 81 if ( (*listIt).isEmpty() ) continue;
80 82
81 found = false; 83 found = false;
82 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 84 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
83 /* 85 /*
84 * We currently do not take app into account 86 * We currently do not take app into account
85 * if name matches and the id isn't already in dummy we'll add it 87 * if name matches and the id isn't already in dummy we'll add it
86 */ 88 */
87 if ( (*catIt).name() == (*listIt) && !dummy.contains(( *catIt).id() ) ) { // the same name 89 if ( (*catIt).name() == (*listIt) && !dummy.contains(( *catIt).id() ) ) { // the same name
@@ -183,25 +185,25 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr )
183{ 185{
184 { //LR 186 { //LR
185 187
186 adr.setUid( el.attribute("Uid" ) ); 188 adr.setUid( el.attribute("Uid" ) );
187 adr.setFamilyName( el.attribute( "LastName" ) ); 189 adr.setFamilyName( el.attribute( "LastName" ) );
188 adr.setGivenName( el.attribute( "FirstName" ) ); 190 adr.setGivenName( el.attribute( "FirstName" ) );
189 adr.setAdditionalName( el.attribute( "MiddleName" ) ); 191 adr.setAdditionalName( el.attribute( "MiddleName" ) );
190 adr.setSuffix( el.attribute( "Suffix" ) ); 192 adr.setSuffix( el.attribute( "Suffix" ) );
191 adr.setNickName( el.attribute( "Nickname" ) ); 193 adr.setNickName( el.attribute( "Nickname" ) );
192 194
193 QDate date = dateFromString( el.attribute( "Birthday" ) ); 195 QDate date = dateFromString( el.attribute( "Birthday" ) );
194 if ( date.isValid() ) 196 if ( date.isValid() )
195 adr.setBirthday( date ); 197 adr.setBirthday( (QDateTime)date );
196 198
197 adr.setRole( el.attribute( "JobTitle" ) ); 199 adr.setRole( el.attribute( "JobTitle" ) );
198 if ( !el.attribute( "FileAs" ).isEmpty() ) 200 if ( !el.attribute( "FileAs" ).isEmpty() )
199 adr.setFormattedName( el.attribute( "FileAs" ) ); 201 adr.setFormattedName( el.attribute( "FileAs" ) );
200 202
201 adr.setOrganization( el.attribute( "Company" ) ); 203 adr.setOrganization( el.attribute( "Company" ) );
202 204
203 KABC::PhoneNumber businessPhoneNum( el.attribute( "BusinessPhone" ), 205 KABC::PhoneNumber businessPhoneNum( el.attribute( "BusinessPhone" ),
204 KABC::PhoneNumber::Work | KABC::PhoneNumber::Pref ); 206 KABC::PhoneNumber::Work | KABC::PhoneNumber::Pref );
205 KABC::PhoneNumber businessFaxNum( el.attribute( "BusinessFax" ), 207 KABC::PhoneNumber businessFaxNum( el.attribute( "BusinessFax" ),
206 KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax ); 208 KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax );
207 KABC::PhoneNumber businessMobile( el.attribute( "BusinessMobile" ), 209 KABC::PhoneNumber businessMobile( el.attribute( "BusinessMobile" ),
@@ -308,25 +310,25 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr )
308 if ( !el.attribute( "Profession" ).isEmpty() ) 310 if ( !el.attribute( "Profession" ).isEmpty() )
309 adr.insertCustom("KADDRESSBOOK", "X-Profession", el.attribute("Profession") ); 311 adr.insertCustom("KADDRESSBOOK", "X-Profession", el.attribute("Profession") );
310 if ( !el.attribute( "Assistant" ).isEmpty() ) 312 if ( !el.attribute( "Assistant" ).isEmpty() )
311 adr.insertCustom("KADDRESSBOOK", "X-AssistantsName", el.attribute("Assistant") ); 313 adr.insertCustom("KADDRESSBOOK", "X-AssistantsName", el.attribute("Assistant") );
312 if ( !el.attribute( "Manager" ).isEmpty() ) 314 if ( !el.attribute( "Manager" ).isEmpty() )
313 adr.insertCustom("KADDRESSBOOK", "X-ManagersName", el.attribute("Manager") ); 315 adr.insertCustom("KADDRESSBOOK", "X-ManagersName", el.attribute("Manager") );
314 316
315 317
316 } 318 }
317 return true; 319 return true;
318} 320}
319 321
320bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, QTextStream *stream ) 322bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, Q3TextStream *stream )
321{ 323{
322 *stream << "<Contact "; 324 *stream << "<Contact ";
323 *stream << "FirstName=\"" << escape(ab.givenName()) << "\" "; 325 *stream << "FirstName=\"" << escape(ab.givenName()) << "\" ";
324 *stream << "MiddleName=\"" << escape(ab.additionalName()) << "\" "; 326 *stream << "MiddleName=\"" << escape(ab.additionalName()) << "\" ";
325 *stream << "LastName=\"" << escape(ab.familyName()) << "\" "; 327 *stream << "LastName=\"" << escape(ab.familyName()) << "\" ";
326 *stream << "Suffix=\"" << escape(ab.suffix()) << "\" "; 328 *stream << "Suffix=\"" << escape(ab.suffix()) << "\" ";
327 329
328 QString sortStr; 330 QString sortStr;
329 sortStr = ab.formattedName(); 331 sortStr = ab.formattedName();
330 /* is formattedName is empty we use the assembled name as fallback */ 332 /* is formattedName is empty we use the assembled name as fallback */
331 if (sortStr.isEmpty() ) 333 if (sortStr.isEmpty() )
332 sortStr = ab.assembledName(); 334 sortStr = ab.assembledName();
@@ -475,31 +477,31 @@ QStringList AddressBook::attributes()const {
475 477
476 478
477CategoryEdit::CategoryEdit(){ 479CategoryEdit::CategoryEdit(){
478} 480}
479CategoryEdit::CategoryEdit(const QString &fileName){ 481CategoryEdit::CategoryEdit(const QString &fileName){
480 parse( fileName ); 482 parse( fileName );
481} 483}
482CategoryEdit::~CategoryEdit(){ 484CategoryEdit::~CategoryEdit(){
483} 485}
484void CategoryEdit::save(const QString& fileName)const{ 486void CategoryEdit::save(const QString& fileName)const{
485 QFile file( fileName ); 487 QFile file( fileName );
486 QString endl = "\n"; 488 QString endl = "\n";
487 if ( file.open( IO_WriteOnly ) ) { 489 if ( file.open( QIODevice::WriteOnly ) ) {
488 QTextStream stream( &file ); 490 Q3TextStream stream( &file );
489 stream.setEncoding( QTextStream::UnicodeUTF8 ); 491 stream.setEncoding( Q3TextStream::UnicodeUTF8 );
490 stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; 492 stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
491 stream << "<!DOCTYPE CategoryList>" << endl; 493 stream << "<!DOCTYPE CategoryList>" << endl;
492 stream << "<Categories>" << endl; 494 stream << "<Categories>" << endl;
493 for ( QValueList<OpieCategories>::ConstIterator it = m_categories.begin(); 495 for ( Q3ValueList<OpieCategories>::ConstIterator it = m_categories.begin();
494 it != m_categories.end(); ++it ) 496 it != m_categories.end(); ++it )
495 { 497 {
496 stream << "<Category id=\""<< ( (*it).id() ) << "\" "; 498 stream << "<Category id=\""<< ( (*it).id() ) << "\" ";
497 499
498 if ( !(*it).app().isEmpty() ) 500 if ( !(*it).app().isEmpty() )
499 stream << " app=\""<< ( (*it).app() ) << "\" "; 501 stream << " app=\""<< ( (*it).app() ) << "\" ";
500 502
501 stream << "name=\"" << ( (*it).name() ) << "\" "; 503 stream << "name=\"" << ( (*it).name() ) << "\" ";
502 stream << " />" << endl; 504 stream << " />" << endl;
503 } 505 }
504 stream << "</Categories>" << endl; 506 stream << "</Categories>" << endl;
505 file.close(); 507 file.close();
@@ -528,25 +530,25 @@ int CategoryEdit::addCategory( const QString &appName, const QString &name, in
528} 530}
529/* 531/*
530 * we parse the simple Category File here 532 * we parse the simple Category File here
531 * We also keep track of global Cats 533 * We also keep track of global Cats
532 * and Of Organizer and Contact cats and then 534 * and Of Organizer and Contact cats and then
533 * we will add them to the kde side... 535 * we will add them to the kde side...
534 */ 536 */
535void CategoryEdit::parse( const QString &tempFile ){ 537void CategoryEdit::parse( const QString &tempFile ){
536 clear(); 538 clear();
537 539
538 QDomDocument doc( "mydocument" ); 540 QDomDocument doc( "mydocument" );
539 QFile f( tempFile ); 541 QFile f( tempFile );
540 if ( !f.open( IO_ReadOnly ) ) 542 if ( !f.open( QIODevice::ReadOnly ) )
541 return; 543 return;
542 544
543 if ( !doc.setContent( &f ) ) { 545 if ( !doc.setContent( &f ) ) {
544 f.close(); 546 f.close();
545 return; 547 return;
546 } 548 }
547 f.close(); 549 f.close();
548 550
549 QStringList global, contact, organizer; 551 QStringList global, contact, organizer;
550 552
551 // print out the element names of all elements that are a direct child 553 // print out the element names of all elements that are a direct child
552 // of the outermost element. 554 // of the outermost element.
@@ -578,25 +580,25 @@ void CategoryEdit::parse( const QString &tempFile ){
578 } 580 }
579 updateKDE( "kaddressbookrc", global + contact ); 581 updateKDE( "kaddressbookrc", global + contact );
580 updateKDE( "korganizerrc", global + organizer ); 582 updateKDE( "korganizerrc", global + organizer );
581 583
582} 584}
583void CategoryEdit::clear() 585void CategoryEdit::clear()
584{ 586{
585 ids.clear(); 587 ids.clear();
586 m_categories.clear(); 588 m_categories.clear();
587} 589}
588QString CategoryEdit::categoryById( const QString &id, const QString &app )const 590QString CategoryEdit::categoryById( const QString &id, const QString &app )const
589{ 591{
590 QValueList<OpieCategories>::ConstIterator it; 592 Q3ValueList<OpieCategories>::ConstIterator it;
591 QString category; 593 QString category;
592 QString fallback; 594 QString fallback;
593 for( it = m_categories.begin(); it != m_categories.end(); ++it ){ 595 for( it = m_categories.begin(); it != m_categories.end(); ++it ){
594 if( id.stripWhiteSpace() == (*it).id().stripWhiteSpace() ){ 596 if( id.stripWhiteSpace() == (*it).id().stripWhiteSpace() ){
595 if( app == (*it).app() ){ 597 if( app == (*it).app() ){
596 category = (*it).name(); 598 category = (*it).name();
597 break; 599 break;
598 }else{ 600 }else{
599 fallback = (*it).name(); 601 fallback = (*it).name();
600 } 602 }
601 } 603 }
602 } 604 }
diff --git a/kabc/plugins/qtopia/qtopiaconverter.h b/kabc/plugins/qtopia/qtopiaconverter.h
index 744dd41..389926c 100644
--- a/kabc/plugins/qtopia/qtopiaconverter.h
+++ b/kabc/plugins/qtopia/qtopiaconverter.h
@@ -19,24 +19,27 @@
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24$Id$ 24$Id$
25*/ 25*/
26 26
27#ifndef KABC_QTOPIACONVERTER_H 27#ifndef KABC_QTOPIACONVERTER_H
28#define KABC_QTOPIACONVERTER_H 28#define KABC_QTOPIACONVERTER_H
29 29
30#include <qstring.h> 30#include <qstring.h>
31//Added by qt3to4:
32#include <Q3ValueList>
33#include <Q3TextStream>
31 34
32#include "addressee.h" 35#include "addressee.h"
33#ifdef DESKTOP_VERSION 36#ifdef DESKTOP_VERSION
34#include <qdom.h> 37#include <qdom.h>
35#else 38#else
36#include <xml/qdom.h> 39#include <xml/qdom.h>
37#endif 40#endif
38class Categories; 41class Categories;
39 42
40namespace KABC { 43namespace KABC {
41 44
42 45
@@ -67,32 +70,32 @@ class OpieCategories {
67 CategoryEdit(const QString &fileName); 70 CategoryEdit(const QString &fileName);
68 ~CategoryEdit(); 71 ~CategoryEdit();
69 72
70 void save(const QString&) const; 73 void save(const QString&) const;
71 int addCategory( const QString &name, int id = 0 ); 74 int addCategory( const QString &name, int id = 0 );
72 int addCategory(const QString &appName, const QString &name, int id = 0); 75 int addCategory(const QString &appName, const QString &name, int id = 0);
73 void parse( const QString &fileName ); 76 void parse( const QString &fileName );
74 77
75 QString categoryById(const QString &id, const QString &app )const; 78 QString categoryById(const QString &id, const QString &app )const;
76 QStringList categoriesByIds( const QStringList& ids, const QString& app ); 79 QStringList categoriesByIds( const QStringList& ids, const QString& app );
77 80
78 void clear(); 81 void clear();
79 QValueList<OpieCategories> categories()const { return m_categories; }; 82 Q3ValueList<OpieCategories> categories()const { return m_categories; };
80 private: 83 private:
81 /** 84 /**
82 * this function will be used internally to update the kde categories... 85 * this function will be used internally to update the kde categories...
83 */ 86 */
84 void updateKDE( const QString& app, const QStringList& categories ); 87 void updateKDE( const QString& app, const QStringList& categories );
85 QMap<int, bool> ids; // from tt Qtopia::UidGen 88 QMap<int, bool> ids; // from tt Qtopia::UidGen
86 QValueList<OpieCategories> m_categories; 89 Q3ValueList<OpieCategories> m_categories;
87 }; 90 };
88 91
89 92
90class QtopiaConverter 93class QtopiaConverter
91{ 94{
92public: 95public:
93 96
94 /** 97 /**
95 * Constructor. 98 * Constructor.
96 */ 99 */
97 QtopiaConverter(); 100 QtopiaConverter();
98 101
@@ -108,25 +111,25 @@ public:
108 * Converts a vcard string to an addressee. 111 * Converts a vcard string to an addressee.
109 * 112 *
110 * @param contact The qtopia contact. 113 * @param contact The qtopia contact.
111 * @param addr The addressee. 114 * @param addr The addressee.
112 */ 115 */
113 bool qtopiaToAddressee( const QDomElement& el, Addressee &adr ); 116 bool qtopiaToAddressee( const QDomElement& el, Addressee &adr );
114 /** 117 /**
115 * Converts an addressee to a vcard string. 118 * Converts an addressee to a vcard string.
116 * 119 *
117 * @param addr The addressee. 120 * @param addr The addressee.
118 * @param contact The qtopia contact. 121 * @param contact The qtopia contact.
119 */ 122 */
120 bool addresseeToQtopia( const Addressee &ab, QTextStream *stream ); 123 bool addresseeToQtopia( const Addressee &ab, Q3TextStream *stream );
121 124
122 private: 125 private:
123 QString categoriesToNumber( const QStringList &list, const QString &app ); 126 QString categoriesToNumber( const QStringList &list, const QString &app );
124 QString escape( const QString& s){ return s;}; 127 QString escape( const QString& s){ return s;};
125 CategoryEdit *m_edit; 128 CategoryEdit *m_edit;
126 QDate fromString( const QString& ); 129 QDate fromString( const QString& );
127 QDate dateFromString( const QString& ); 130 QDate dateFromString( const QString& );
128 QString dateToString( const QDate& ); 131 QString dateToString( const QDate& );
129 132
130 133
131}; 134};
132} 135}
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index 79ddaea..a36eb8f 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -22,25 +22,25 @@
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27#include <sys/types.h> 27#include <sys/types.h>
28#include <sys/stat.h> 28#include <sys/stat.h>
29#ifndef _WIN32_ 29#ifndef _WIN32_
30#include <unistd.h> 30#include <unistd.h>
31#endif 31#endif
32#include <qdir.h> 32#include <qdir.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qtextstream.h> 34#include <q3textstream.h>
35#include <qfileinfo.h> 35#include <qfileinfo.h>
36#include <qregexp.h> 36#include <qregexp.h>
37//US #include <qtimer.h> 37//US #include <qtimer.h>
38 38
39#include <kapplication.h> 39#include <kapplication.h>
40#include <kconfig.h> 40#include <kconfig.h>
41#include <kdebug.h> 41#include <kdebug.h>
42#include <klocale.h> 42#include <klocale.h>
43//US #include <ksavefile.h> 43//US #include <ksavefile.h>
44#include <kstandarddirs.h> 44#include <kstandarddirs.h>
45#include <kmessagebox.h> 45#include <kmessagebox.h>
46 46
@@ -147,25 +147,25 @@ void ResourceQtopia::doClose()
147 147
148 148
149 // it seems so, that deletion of access deletes backend as well 149 // it seems so, that deletion of access deletes backend as well
150 //delete backend; 150 //delete backend;
151 151
152 return; 152 return;
153} 153}
154 154
155bool ResourceQtopia::load() 155bool ResourceQtopia::load()
156{ 156{
157 157
158 QFile file( fileName() ); 158 QFile file( fileName() );
159 if ( !file.open(IO_ReadOnly ) ) { 159 if ( !file.open(QIODevice::ReadOnly ) ) {
160 return false; 160 return false;
161 } 161 }
162 162
163 QDomDocument doc("mydocument" ); 163 QDomDocument doc("mydocument" );
164 if ( !doc.setContent( &file ) ) { 164 if ( !doc.setContent( &file ) ) {
165 file.close(); 165 file.close();
166 return false; 166 return false;
167 } 167 }
168 bool res; 168 bool res;
169 QDomElement docElem = doc.documentElement( ); 169 QDomElement docElem = doc.documentElement( );
170 QDomNode n = docElem.firstChild(); 170 QDomNode n = docElem.firstChild();
171 while ( !n.isNull() ) { 171 while ( !n.isNull() ) {
@@ -194,30 +194,30 @@ bool ResourceQtopia::load()
194 } 194 }
195 return true; 195 return true;
196} 196}
197 197
198bool ResourceQtopia::save( Ticket *ticket ) 198bool ResourceQtopia::save( Ticket *ticket )
199{ 199{
200#ifdef _USE_DIRWATCH_ 200#ifdef _USE_DIRWATCH_
201 mDirWatch.stopScan(); 201 mDirWatch.stopScan();
202#endif 202#endif
203 KABC::AddressBook::Iterator it; 203 KABC::AddressBook::Iterator it;
204 bool res; 204 bool res;
205 QFile file( fileName() ); 205 QFile file( fileName() );
206 if (!file.open( IO_WriteOnly ) ) { 206 if (!file.open( QIODevice::WriteOnly ) ) {
207 return false; 207 return false;
208 } 208 }
209 QTextStream ts( &file ); 209 Q3TextStream ts( &file );
210 QTextStream *stream = &ts; 210 Q3TextStream *stream = &ts;
211 stream->setEncoding( QTextStream::UnicodeUTF8 ); 211 stream->setEncoding( Q3TextStream::UnicodeUTF8 );
212 *stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE Addressbook ><AddressBook>" << endl; 212 *stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE Addressbook ><AddressBook>" << endl;
213 *stream << " <Groups>" << endl; 213 *stream << " <Groups>" << endl;
214 *stream << " </Groups>" << endl; 214 *stream << " </Groups>" << endl;
215 *stream << " <Contacts> " << endl; 215 *stream << " <Contacts> " << endl;
216 // for all entries 216 // for all entries
217 KABC::Addressee ab; 217 KABC::Addressee ab;
218 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { 218 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
219 KABC::Addressee addressee = (*it); 219 KABC::Addressee addressee = (*it);
220 res = mConverter->addresseeToQtopia( addressee, stream ); 220 res = mConverter->addresseeToQtopia( addressee, stream );
221 if (!res == true) 221 if (!res == true)
222 { 222 {
223 qDebug("Unable to convert Addressee %s", addressee.formattedName().latin1()); 223 qDebug("Unable to convert Addressee %s", addressee.formattedName().latin1());
@@ -251,25 +251,25 @@ bool ResourceQtopia::lock( const QString &lockfileName )
251 } 251 }
252 252
253 QString lockUniqueName; 253 QString lockUniqueName;
254 lockUniqueName = fn + KApplication::randomString( 8 ); 254 lockUniqueName = fn + KApplication::randomString( 8 );
255 255
256 url = lockUniqueName; 256 url = lockUniqueName;
257//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName ); 257//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName );
258 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() ); 258 mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() );
259 kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl; 259 kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl;
260 260
261 // Create unique file 261 // Create unique file
262 QFile file( mLockUniqueName ); 262 QFile file( mLockUniqueName );
263 file.open( IO_WriteOnly ); 263 file.open( QIODevice::WriteOnly );
264 file.close(); 264 file.close();
265 265
266 // Create lock file 266 // Create lock file
267 int result = 0; 267 int result = 0;
268#ifndef _WIN32_ 268#ifndef _WIN32_
269 result = ::link( QFile::encodeName( mLockUniqueName ), 269 result = ::link( QFile::encodeName( mLockUniqueName ),
270 QFile::encodeName( lockName ) ); 270 QFile::encodeName( lockName ) );
271#endif 271#endif
272 if ( result == 0 ) { 272 if ( result == 0 ) {
273 addressBook()->emitAddressBookLocked(); 273 addressBook()->emitAddressBookLocked();
274 return true; 274 return true;
275 } 275 }
diff --git a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp
index d5d6141..42fd428 100644
--- a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp
+++ b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp
@@ -18,44 +18,46 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30//Added by qt3to4:
31#include <Q3GridLayout>
30 32
31#include <kdebug.h> 33#include <kdebug.h>
32#include <klocale.h> 34#include <klocale.h>
33#include <kstandarddirs.h> 35#include <kstandarddirs.h>
34#include <kdialog.h> 36#include <kdialog.h>
35 37
36//#include <unistd.h> 38//#include <unistd.h>
37 39
38#include <qdir.h> 40#include <qdir.h>
39#include <qfile.h> 41#include <qfile.h>
40#include "resourceqtopia.h" 42#include "resourceqtopia.h"
41 43
42#include "resourceqtopiaconfig.h" 44#include "resourceqtopiaconfig.h"
43 45
44using namespace KABC; 46using namespace KABC;
45 47
46ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name ) 48ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name )
47 : ConfigWidget( parent, name ) 49 : ConfigWidget( parent, name )
48{ 50{
49 QGridLayout *mainLayout = new QGridLayout( this, 1, 2, 0, 51 Q3GridLayout *mainLayout = new Q3GridLayout( this, 1, 2, 0,
50 KDialog::spacingHint() ); 52 KDialog::spacingHint() );
51 53
52 QLabel *label = new QLabel( i18n( "Location:" ), this ); 54 QLabel *label = new QLabel( i18n( "Location:" ), this );
53 mFileNameEdit = new KURLRequester( this ); 55 mFileNameEdit = new KURLRequester( this );
54 56
55 connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ), 57 connect( mFileNameEdit, SIGNAL( textChanged( const QString & ) ),
56 SLOT( checkFilePermissions( const QString & ) ) ); 58 SLOT( checkFilePermissions( const QString & ) ) );
57 59
58 mainLayout->addWidget( label, 0, 0 ); 60 mainLayout->addWidget( label, 0, 0 );
59 mainLayout->addWidget( mFileNameEdit, 0, 1 ); 61 mainLayout->addWidget( mFileNameEdit, 0, 1 );
60 62
61} 63}
diff --git a/kabc/plugins/sharpdtm/sharpdtmE.pro b/kabc/plugins/sharpdtm/sharpdtmE.pro
index 23b0b76..7fc8ba8 100644
--- a/kabc/plugins/sharpdtm/sharpdtmE.pro
+++ b/kabc/plugins/sharpdtm/sharpdtmE.pro
@@ -1,25 +1,25 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3TARGET = microkabc_sharpdtm 3TARGET = xmicrokabc_sharpdtm
4 4
5INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 5INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
6 6
7 7
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
10DESTDIR = $(QPEDIR)/lib 10DESTDIR = $(QPEDIR)/lib
11LIBS += -lmicrokde 11LIBS += -lxmicrokde
12LIBS += -lmicrokabc 12LIBS += -lxmicrokabc
13LIBS += -lmicrokdepim 13LIBS += -lxmicrokdepim
14LIBS += -lmicroqtcompat 14LIBS += -lmicroqtcompat
15LIBS += -L$(QPEDIR)/lib 15LIBS += -L$(QPEDIR)/lib
16LIBS += -ljpeg 16LIBS += -ljpeg
17LIBS += -lqpe 17LIBS += -lqpe
18LIBS += -lqte 18LIBS += -lqte
19LIBS += -lzdtm 19LIBS += -lzdtm
20LIBS += -lsl 20LIBS += -lsl
21 21
22 22
23 23
24INTERFACES = \ 24INTERFACES = \
25 25
diff --git a/kabc/secrecy.h b/kabc/secrecy.h
index b2ff565..0fe956e 100644
--- a/kabc/secrecy.h
+++ b/kabc/secrecy.h
@@ -19,35 +19,35 @@
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_SECRECY_H 28#ifndef KABC_SECRECY_H
29#define KABC_SECRECY_H 29#define KABC_SECRECY_H
30 30
31#include <qvaluelist.h> 31#include <q3valuelist.h>
32 32
33namespace KABC { 33namespace KABC {
34 34
35class Secrecy 35class Secrecy
36{ 36{
37 friend QDataStream &operator<<( QDataStream &, const Secrecy & ); 37 friend QDataStream &operator<<( QDataStream &, const Secrecy & );
38 friend QDataStream &operator>>( QDataStream &, Secrecy & ); 38 friend QDataStream &operator>>( QDataStream &, Secrecy & );
39 39
40public: 40public:
41 typedef QValueList<int> TypeList; 41 typedef Q3ValueList<int> TypeList;
42 42
43 /** 43 /**
44 * Secrecy types 44 * Secrecy types
45 * 45 *
46 * @li Public - for public access 46 * @li Public - for public access
47 * @li Private - only private access 47 * @li Private - only private access
48 * @li Confidential - access for confidential persons 48 * @li Confidential - access for confidential persons
49 */ 49 */
50 enum Types { 50 enum Types {
51 Public, 51 Public,
52 Private, 52 Private,
53 Confidential, 53 Confidential,
diff --git a/kabc/sound.h b/kabc/sound.h
index 0ec5ec8..9777054 100644
--- a/kabc/sound.h
+++ b/kabc/sound.h
@@ -19,25 +19,25 @@
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_SOUND_H 28#ifndef KABC_SOUND_H
29#define KABC_SOUND_H 29#define KABC_SOUND_H
30 30
31#include <qcstring.h> 31#include <q3cstring.h>
32#include <qstring.h> 32#include <qstring.h>
33 33
34namespace KABC { 34namespace KABC {
35 35
36class Sound 36class Sound
37{ 37{
38 friend QDataStream &operator<<( QDataStream &, const Sound & ); 38 friend QDataStream &operator<<( QDataStream &, const Sound & );
39 friend QDataStream &operator>>( QDataStream &, Sound & ); 39 friend QDataStream &operator>>( QDataStream &, Sound & );
40 40
41public: 41public:
42 42
43 /** 43 /**
diff --git a/kabc/tmpaddressbook.cpp b/kabc/tmpaddressbook.cpp
index cfa57e3..5152e00 100644
--- a/kabc/tmpaddressbook.cpp
+++ b/kabc/tmpaddressbook.cpp
@@ -15,25 +15,25 @@
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28 28
29#include "tmpaddressbook.h" 29#include "tmpaddressbook.h"
30 30
31using namespace KABC; 31using namespace KABC;
32 32
33#include "resource.h" 33#include "resource.h"
34 34
35TmpAddressBook::TmpAddressBook() 35TmpAddressBook::TmpAddressBook()
36 : AddressBook(0, "tmpcontact") 36 : AddressBook(0, "tmpcontact")
37{ 37{
38} 38}
39 39
diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp
index fa46499..33d358c 100644
--- a/kabc/vcard/AdrParam.cpp
+++ b/kabc/vcard/AdrParam.cpp
@@ -15,78 +15,80 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardRToken.h> 24#include <VCardRToken.h>
25#include <VCardAdrParam.h> 25#include <VCardAdrParam.h>
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30AdrParam::AdrParam() 32AdrParam::AdrParam()
31 :Param() 33 :Param()
32{ 34{
33} 35}
34 36
35AdrParam::AdrParam(const AdrParam & x) 37AdrParam::AdrParam(const AdrParam & x)
36 :Param(x), 38 :Param(x),
37 adrTypeList_(x.adrTypeList_) 39 adrTypeList_(x.adrTypeList_)
38{ 40{
39} 41}
40 42
41AdrParam::AdrParam(const QCString & s) 43AdrParam::AdrParam(const Q3CString & s)
42 :Param(s) 44 :Param(s)
43{ 45{
44} 46}
45 47
46 AdrParam & 48 AdrParam &
47AdrParam::operator = (AdrParam & x) 49AdrParam::operator = (AdrParam & x)
48{ 50{
49 if (*this == x) return *this; 51 if (*this == x) return *this;
50 52
51 adrTypeList_= x.adrTypeList(); 53 adrTypeList_= x.adrTypeList();
52 textParam_ = x.textParam(); 54 textParam_ = x.textParam();
53 55
54 Param::operator = (x); 56 Param::operator = (x);
55 return *this; 57 return *this;
56} 58}
57 59
58 AdrParam & 60 AdrParam &
59AdrParam::operator = (const QCString & s) 61AdrParam::operator = (const Q3CString & s)
60{ 62{
61 Param::operator = (s); 63 Param::operator = (s);
62 64
63 adrTypeList_.clear(); 65 adrTypeList_.clear();
64 textParam_.truncate(0); 66 textParam_.truncate(0);
65 67
66 return *this; 68 return *this;
67} 69}
68 70
69 bool 71 bool
70AdrParam::operator == (AdrParam & x) 72AdrParam::operator == (AdrParam & x)
71{ 73{
72 parse(); 74 parse();
73 75
74 if (!x.textParam().isEmpty()) 76 if (!x.textParam().isEmpty())
75 return (x.textParam_ == textParam_); 77 return (x.textParam_ == textParam_);
76 78
77 if (x.adrTypeList().count() != adrTypeList_.count()) 79 if (x.adrTypeList().count() != adrTypeList_.count())
78 return false; 80 return false;
79 81
80 QStrListIterator it(x.adrTypeList_); 82 Q3StrListIterator it(x.adrTypeList_);
81 83
82 for (; it.current(); ++it) 84 for (; it.current(); ++it)
83 if (!adrTypeList_.find(it.current())) 85 if (!adrTypeList_.find(it.current()))
84 return false; 86 return false;
85 87
86 return true; 88 return true;
87} 89}
88 90
89AdrParam::~AdrParam() 91AdrParam::~AdrParam()
90{ 92{
91} 93}
92 94
@@ -105,22 +107,22 @@ AdrParam::_parse()
105 107
106 RTokenise(strRep_, ",", adrTypeList_); 108 RTokenise(strRep_, ",", adrTypeList_);
107} 109}
108 110
109 void 111 void
110AdrParam::_assemble() 112AdrParam::_assemble()
111{ 113{
112 if (!textParam_.isEmpty()) { 114 if (!textParam_.isEmpty()) {
113 strRep_ = textParam_; 115 strRep_ = textParam_;
114 return; 116 return;
115 } 117 }
116 118
117 QStrListIterator it(adrTypeList_); 119 Q3StrListIterator it(adrTypeList_);
118 120
119 for (; it.current(); ++it) { 121 for (; it.current(); ++it) {
120 122
121 strRep_ += it.current(); 123 strRep_ += it.current();
122 124
123 if (it.current() != adrTypeList_.last()) 125 if (it.current() != adrTypeList_.last())
124 strRep_ += ','; 126 strRep_ += ',';
125 } 127 }
126} 128}
diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp
index 7ecef33..51ca12a 100644
--- a/kabc/vcard/AdrValue.cpp
+++ b/kabc/vcard/AdrValue.cpp
@@ -16,68 +16,71 @@
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardRToken.h> 24#include <VCardRToken.h>
25#include <VCardAdrValue.h> 25#include <VCardAdrValue.h>
26#include <VCardValue.h> 26#include <VCardValue.h>
27#include <VCardDefines.h> 27#include <VCardDefines.h>
28//Added by qt3to4:
29#include <Q3StrList>
30#include <Q3CString>
28 31
29using namespace VCARD; 32using namespace VCARD;
30 33
31AdrValue::AdrValue() 34AdrValue::AdrValue()
32 :Value() 35 :Value()
33{ 36{
34} 37}
35 38
36AdrValue::AdrValue(const AdrValue & x) 39AdrValue::AdrValue(const AdrValue & x)
37 :Value(x), 40 :Value(x),
38 poBox_ (x.poBox_), 41 poBox_ (x.poBox_),
39 extAddress_(x.extAddress_), 42 extAddress_(x.extAddress_),
40 street_ (x.street_), 43 street_ (x.street_),
41 locality_(x.locality_), 44 locality_(x.locality_),
42 region_ (x.region_), 45 region_ (x.region_),
43 postCode_(x.postCode_), 46 postCode_(x.postCode_),
44 countryName_(x.countryName_) 47 countryName_(x.countryName_)
45{ 48{
46} 49}
47 50
48AdrValue::AdrValue(const QCString & s) 51AdrValue::AdrValue(const Q3CString & s)
49 :Value(s) 52 :Value(s)
50{ 53{
51} 54}
52 55
53 AdrValue & 56 AdrValue &
54AdrValue::operator = (AdrValue & x) 57AdrValue::operator = (AdrValue & x)
55{ 58{
56 if (*this == x) return *this; 59 if (*this == x) return *this;
57 60
58 poBox_ = x.poBox_; 61 poBox_ = x.poBox_;
59 extAddress_= x.extAddress_; 62 extAddress_= x.extAddress_;
60 street_ = x.street_; 63 street_ = x.street_;
61 locality_= x.locality_; 64 locality_= x.locality_;
62 region_ = x.region_; 65 region_ = x.region_;
63 postCode_= x.postCode_; 66 postCode_= x.postCode_;
64 countryName_= x.countryName_; 67 countryName_= x.countryName_;
65 68
66 Value::operator = (x); 69 Value::operator = (x);
67 return *this; 70 return *this;
68} 71}
69 72
70 AdrValue & 73 AdrValue &
71AdrValue::operator = (const QCString & s) 74AdrValue::operator = (const Q3CString & s)
72{ 75{
73 Value::operator = (s); 76 Value::operator = (s);
74 return *this; 77 return *this;
75} 78}
76 79
77 bool 80 bool
78AdrValue::operator == (AdrValue & x) 81AdrValue::operator == (AdrValue & x)
79{ 82{
80 parse(); 83 parse();
81 x.parse(); 84 x.parse();
82 85
83 return ( 86 return (
@@ -96,25 +99,25 @@ AdrValue::~AdrValue()
96 99
97 AdrValue * 100 AdrValue *
98AdrValue::clone() 101AdrValue::clone()
99{ 102{
100 return new AdrValue( *this ); 103 return new AdrValue( *this );
101} 104}
102 105
103 void 106 void
104AdrValue::_parse() 107AdrValue::_parse()
105{ 108{
106 vDebug("AdrValue::_parse()"); 109 vDebug("AdrValue::_parse()");
107 110
108 QStrList l; 111 Q3StrList l;
109 RTokenise(strRep_, ";", l); 112 RTokenise(strRep_, ";", l);
110 113
111 for (unsigned int i = 0; i < l.count(); i++) { 114 for (unsigned int i = 0; i < l.count(); i++) {
112 115
113 switch (i) { 116 switch (i) {
114 117
115 case 0: poBox_ = l.at(0);break; 118 case 0: poBox_ = l.at(0);break;
116 case 1: extAddress_ = l.at(1);break; 119 case 1: extAddress_ = l.at(1);break;
117 case 2: street_ = l.at(2);break; 120 case 2: street_ = l.at(2);break;
118 case 3: locality_ = l.at(3);break; 121 case 3: locality_ = l.at(3);break;
119 case 4: region_ = l.at(4);break; 122 case 4: region_ = l.at(4);break;
120 case 5: postCode_ = l.at(5);break; 123 case 5: postCode_ = l.at(5);break;
diff --git a/kabc/vcard/AgentParam.cpp b/kabc/vcard/AgentParam.cpp
index 5625e00..aae35ac 100644
--- a/kabc/vcard/AgentParam.cpp
+++ b/kabc/vcard/AgentParam.cpp
@@ -15,58 +15,60 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardAgentParam.h> 24#include <VCardAgentParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30AgentParam::AgentParam() 32AgentParam::AgentParam()
31 :Param() 33 :Param()
32{ 34{
33} 35}
34 36
35AgentParam::AgentParam(const AgentParam & x) 37AgentParam::AgentParam(const AgentParam & x)
36 :Param(x), 38 :Param(x),
37 refer_(x.refer_), 39 refer_(x.refer_),
38 uri_(x.uri_) 40 uri_(x.uri_)
39{ 41{
40} 42}
41 43
42AgentParam::AgentParam(const QCString & s) 44AgentParam::AgentParam(const Q3CString & s)
43 :Param(s) 45 :Param(s)
44{ 46{
45} 47}
46 48
47 AgentParam & 49 AgentParam &
48AgentParam::operator = (AgentParam & x) 50AgentParam::operator = (AgentParam & x)
49{ 51{
50 if (*this == x) return *this; 52 if (*this == x) return *this;
51 53
52 refer_= x.refer_; 54 refer_= x.refer_;
53 uri_= x.uri_; 55 uri_= x.uri_;
54 56
55 Param::operator = (x); 57 Param::operator = (x);
56 return *this; 58 return *this;
57} 59}
58 60
59 AgentParam & 61 AgentParam &
60AgentParam::operator = (const QCString & s) 62AgentParam::operator = (const Q3CString & s)
61{ 63{
62 Param::operator = (s); 64 Param::operator = (s);
63 return *this; 65 return *this;
64} 66}
65 67
66 bool 68 bool
67AgentParam::operator == (AgentParam & x) 69AgentParam::operator == (AgentParam & x)
68{ 70{
69 parse(); 71 parse();
70 72
71 if (refer_) 73 if (refer_)
72 return (x.refer() && uri_ == x.uri_); 74 return (x.refer() && uri_ == x.uri_);
diff --git a/kabc/vcard/AgentValue.cpp b/kabc/vcard/AgentValue.cpp
index bccde80..14e73b1 100644
--- a/kabc/vcard/AgentValue.cpp
+++ b/kabc/vcard/AgentValue.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardAgentValue.h> 24#include <VCardAgentValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30AgentValue::AgentValue() 32AgentValue::AgentValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35AgentValue::AgentValue(const AgentValue & x) 37AgentValue::AgentValue(const AgentValue & x)
36 :Value(x) 38 :Value(x)
37{ 39{
38} 40}
39 41
40AgentValue::AgentValue(const QCString & s) 42AgentValue::AgentValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
44 46
45 AgentValue & 47 AgentValue &
46AgentValue::operator = (AgentValue & x) 48AgentValue::operator = (AgentValue & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Value::operator = (x); 52 Value::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 AgentValue & 56 AgentValue &
55AgentValue::operator = (const QCString & s) 57AgentValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62AgentValue::operator == (AgentValue & x) 64AgentValue::operator == (AgentValue & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/ClassValue.cpp b/kabc/vcard/ClassValue.cpp
index f01e5a6..c088d7c 100644
--- a/kabc/vcard/ClassValue.cpp
+++ b/kabc/vcard/ClassValue.cpp
@@ -17,57 +17,59 @@
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardClassValue.h> 24#include <VCardClassValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27 27
28#include <kdebug.h> 28#include <kdebug.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
32ClassValue::ClassValue() 34ClassValue::ClassValue()
33 :Value() 35 :Value()
34{ 36{
35} 37}
36 38
37ClassValue::ClassValue(const ClassValue & x) 39ClassValue::ClassValue(const ClassValue & x)
38 :Value(x), 40 :Value(x),
39 classType_(x.classType_) 41 classType_(x.classType_)
40{ 42{
41} 43}
42 44
43ClassValue::ClassValue(const QCString & s) 45ClassValue::ClassValue(const Q3CString & s)
44 :Value(s) 46 :Value(s)
45{ 47{
46} 48}
47 49
48 ClassValue & 50 ClassValue &
49ClassValue::operator = (ClassValue & x) 51ClassValue::operator = (ClassValue & x)
50{ 52{
51 if (*this == x) return *this; 53 if (*this == x) return *this;
52 x.parse(); 54 x.parse();
53 55
54 classType_ = x.classType_; 56 classType_ = x.classType_;
55 57
56 Value::operator = (x); 58 Value::operator = (x);
57 return *this; 59 return *this;
58} 60}
59 61
60 ClassValue & 62 ClassValue &
61ClassValue::operator = (const QCString & s) 63ClassValue::operator = (const Q3CString & s)
62{ 64{
63 Value::operator = (s); 65 Value::operator = (s);
64 return *this; 66 return *this;
65} 67}
66 68
67 bool 69 bool
68ClassValue::operator == (ClassValue & x) 70ClassValue::operator == (ClassValue & x)
69{ 71{
70 x.parse(); 72 x.parse();
71 return ( classType_ == x.classType_ ); 73 return ( classType_ == x.classType_ );
72} 74}
73 75
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index 0a2f97d..1d4886c 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -12,26 +12,26 @@
12 12
13 The above copyright notice and this permission notice shall be included in 13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25#include <qstrlist.h> 25#include <q3strlist.h>
26#include <qregexp.h> 26#include <qregexp.h>
27 27
28#include <kdebug.h> 28#include <kdebug.h>
29 29
30#include <VCardAdrParam.h> 30#include <VCardAdrParam.h>
31#include <VCardAgentParam.h> 31#include <VCardAgentParam.h>
32#include <VCardDateParam.h> 32#include <VCardDateParam.h>
33#include <VCardEmailParam.h> 33#include <VCardEmailParam.h>
34#include <VCardImageParam.h> 34#include <VCardImageParam.h>
35#include <VCardSourceParam.h> 35#include <VCardSourceParam.h>
36#include <VCardTelParam.h> 36#include <VCardTelParam.h>
37#include <VCardTextBinParam.h> 37#include <VCardTextBinParam.h>
@@ -89,25 +89,25 @@ ContentLine::ContentLine(const ContentLine & x)
89 89
90 ParamListIterator it(x.paramList_); 90 ParamListIterator it(x.paramList_);
91 for (; it.current(); ++it) 91 for (; it.current(); ++it)
92 { 92 {
93 Param *p = new Param; 93 Param *p = new Param;
94 p->setName( it.current()->name() ); 94 p->setName( it.current()->name() );
95 p->setValue( it.current()->value() ); 95 p->setValue( it.current()->value() );
96 paramList_.append(p); 96 paramList_.append(p);
97 } 97 }
98 98
99} 99}
100 100
101ContentLine::ContentLine(const QCString & s) 101ContentLine::ContentLine(const Q3CString & s)
102 :Entity(s), 102 :Entity(s),
103 value_(0), 103 value_(0),
104 paramType_( ParamUnknown ), 104 paramType_( ParamUnknown ),
105 valueType_( ValueUnknown ), 105 valueType_( ValueUnknown ),
106 entityType_( EntityUnknown ) 106 entityType_( EntityUnknown )
107{ 107{
108 paramList_.setAutoDelete( TRUE ); 108 paramList_.setAutoDelete( TRUE );
109} 109}
110 110
111 ContentLine & 111 ContentLine &
112ContentLine::operator = (ContentLine & x) 112ContentLine::operator = (ContentLine & x)
113{ 113{
@@ -120,128 +120,128 @@ ContentLine::operator = (ContentLine & x)
120 p->setName( it.current()->name() ); 120 p->setName( it.current()->name() );
121 p->setValue( it.current()->value() ); 121 p->setValue( it.current()->value() );
122 paramList_.append(p); 122 paramList_.append(p);
123 } 123 }
124 124
125 value_ = x.value_->clone(); 125 value_ = x.value_->clone();
126 126
127 Entity::operator = (x); 127 Entity::operator = (x);
128 return *this; 128 return *this;
129} 129}
130 130
131 ContentLine & 131 ContentLine &
132ContentLine::operator = (const QCString & s) 132ContentLine::operator = (const Q3CString & s)
133{ 133{
134 Entity::operator = (s); 134 Entity::operator = (s);
135 delete value_; 135 delete value_;
136 value_ = 0; 136 value_ = 0;
137 return *this; 137 return *this;
138} 138}
139 139
140 bool 140 bool
141ContentLine::operator == (ContentLine & x) 141ContentLine::operator == (ContentLine & x)
142{ 142{
143 x.parse(); 143 x.parse();
144 144
145 QPtrListIterator<Param> it(x.paramList()); 145 Q3PtrListIterator<Param> it(x.paramList());
146 146
147 if (!paramList_.find(it.current())) 147 if (!paramList_.find(it.current()))
148 return false; 148 return false;
149 149
150 return true; 150 return true;
151} 151}
152 152
153ContentLine::~ContentLine() 153ContentLine::~ContentLine()
154{ 154{
155 delete value_; 155 delete value_;
156 value_ = 0; 156 value_ = 0;
157} 157}
158 158
159 void 159 void
160ContentLine::_parse() 160ContentLine::_parse()
161{ 161{
162 vDebug("parse"); 162 vDebug("parse");
163 163
164 // Unfold folded lines 164 // Unfold folded lines
165 // NLR 165 // NLR
166 strRep_ = strRep_.replace( QRegExp( "\\r" ), "" ); 166 strRep_ = strRep_.replace( "\\r" , "" );
167 // Unqote newlines 167 // Unqote newlines
168 strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" ); 168 strRep_ = strRep_.replace( "\\\\n", "\n" );
169 //NLR 169 //NLR
170 strRep_ = strRep_.replace( QRegExp( "\\\\r" ), "\r" ); 170 strRep_ = strRep_.replace( "\\\\r" , "\r" );
171 171
172 int split = strRep_.find(':'); 172 int split = strRep_.find(':');
173 173
174 if (split == -1) { // invalid content line 174 if (split == -1) { // invalid content line
175 vDebug("No ':'"); 175 vDebug("No ':'");
176 return; 176 return;
177 } 177 }
178 178
179 QCString firstPart(strRep_.left(split)); 179 Q3CString firstPart(strRep_.left(split));
180 QCString valuePart(strRep_.mid(split + 1)); 180 Q3CString valuePart(strRep_.mid(split + 1));
181 181
182 split = firstPart.find('.'); 182 split = firstPart.find('.');
183 183
184 if (split != -1) { 184 if (split != -1) {
185 group_ = firstPart.left(split); 185 group_ = firstPart.left(split);
186 firstPart= firstPart.mid(split + 1); 186 firstPart= firstPart.mid(split + 1);
187 } 187 }
188 188
189 vDebug("Group == " + group_); 189 vDebug("Group == " + group_);
190 vDebug("firstPart == " + firstPart); 190 vDebug("firstPart == " + firstPart);
191 vDebug("valuePart == " + valuePart); 191 vDebug("valuePart == " + valuePart);
192 192
193 // Now we have the group, the name and param list together and the value. 193 // Now we have the group, the name and param list together and the value.
194 194
195 QStrList l; 195 Q3StrList l;
196 196
197 RTokenise(firstPart, ";", l); 197 RTokenise(firstPart, ";", l);
198 198
199 if (l.count() == 0) {// invalid - no name ! 199 if (l.count() == 0) {// invalid - no name !
200 vDebug("No name for this content line !"); 200 vDebug("No name for this content line !");
201 return; 201 return;
202 } 202 }
203 203
204 name_ = l.at(0); 204 name_ = l.at(0);
205 205
206 // Now we have the name, so the rest of 'l' is the params. 206 // Now we have the name, so the rest of 'l' is the params.
207 // Remove the name part. 207 // Remove the name part.
208 l.remove(0u); 208 l.remove(0u);
209 209
210 entityType_= EntityNameToEntityType(name_); 210 entityType_= EntityNameToEntityType(name_);
211 paramType_= EntityTypeToParamType(entityType_); 211 paramType_= EntityTypeToParamType(entityType_);
212 212
213 unsigned int i = 0; 213 unsigned int i = 0;
214 214
215 // For each parameter, create a new parameter of the correct type. 215 // For each parameter, create a new parameter of the correct type.
216 216
217 QStrListIterator it(l); 217 Q3StrListIterator it(l);
218 218
219 for (; it.current(); ++it, i++) { 219 for (; it.current(); ++it, i++) {
220 220
221 QCString str = *it; 221 Q3CString str = *it;
222 222
223 split = str.find("="); 223 split = str.find("=");
224 if (split < 0 ) { 224 if (split < 0 ) {
225 vDebug("No '=' in paramter."); 225 vDebug("No '=' in paramter.");
226 continue; 226 continue;
227 } 227 }
228 228
229 QCString paraName = str.left(split); 229 Q3CString paraName = str.left(split);
230 QCString paraValue = str.mid(split + 1); 230 Q3CString paraValue = str.mid(split + 1);
231 231
232 QStrList paraValues; 232 Q3StrList paraValues;
233 RTokenise(paraValue, ",", paraValues); 233 RTokenise(paraValue, ",", paraValues);
234 234
235 QStrListIterator it2( paraValues ); 235 Q3StrListIterator it2( paraValues );
236 236
237 for(; it2.current(); ++it2) { 237 for(; it2.current(); ++it2) {
238 238
239 Param *p = new Param; 239 Param *p = new Param;
240 p->setName( paraName ); 240 p->setName( paraName );
241 p->setValue( *it2 ); 241 p->setValue( *it2 );
242 242
243 paramList_.append(p); 243 paramList_.append(p);
244 } 244 }
245 } 245 }
246 246
247 // Create a new value of the correct type. 247 // Create a new value of the correct type.
@@ -300,25 +300,25 @@ ContentLine::_assemble()
300 while( line.length() > ( cursor + 1 ) * maxLen ) { 300 while( line.length() > ( cursor + 1 ) * maxLen ) {
301 cut += line.mid( cursor * maxLen, maxLen ); 301 cut += line.mid( cursor * maxLen, maxLen );
302 cut += "\r\n "; 302 cut += "\r\n ";
303 ++cursor; 303 ++cursor;
304 } 304 }
305 cut += line.mid( cursor * maxLen ); 305 cut += line.mid( cursor * maxLen );
306 strRep_ = cut.latin1(); 306 strRep_ = cut.latin1();
307 //qDebug("ContentLine::_assemble()\n%s*****", strRep_.data()); 307 //qDebug("ContentLine::_assemble()\n%s*****", strRep_.data());
308#if 0 308#if 0
309 vDebug("Assemble (argl) - my name is \"" + name_ + "\""); 309 vDebug("Assemble (argl) - my name is \"" + name_ + "\"");
310 strRep_.truncate(0); 310 strRep_.truncate(0);
311 311
312 QCString line; 312 Q3CString line;
313 313
314 if (!group_.isEmpty()) 314 if (!group_.isEmpty())
315 line += group_ + '.'; 315 line += group_ + '.';
316 316
317 line += name_; 317 line += name_;
318 318
319 vDebug("Adding parameters"); 319 vDebug("Adding parameters");
320 ParamListIterator it(paramList_); 320 ParamListIterator it(paramList_);
321 321
322 for (; it.current(); ++it) 322 for (; it.current(); ++it)
323 line += ";" + it.current()->asString(); 323 line += ";" + it.current()->asString();
324 324
diff --git a/kabc/vcard/DateParam.cpp b/kabc/vcard/DateParam.cpp
index 52af089..52fb828 100644
--- a/kabc/vcard/DateParam.cpp
+++ b/kabc/vcard/DateParam.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardDateParam.h> 24#include <VCardDateParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30DateParam::DateParam() 32DateParam::DateParam()
31 :Param() 33 :Param()
32{ 34{
33} 35}
34 36
35DateParam::DateParam(const DateParam & x) 37DateParam::DateParam(const DateParam & x)
36 :Param(x) 38 :Param(x)
37{ 39{
38} 40}
39 41
40DateParam::DateParam(const QCString & s) 42DateParam::DateParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
44 46
45 DateParam & 47 DateParam &
46DateParam::operator = (DateParam & x) 48DateParam::operator = (DateParam & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Param::operator = (x); 52 Param::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 DateParam & 56 DateParam &
55DateParam::operator = (const QCString & s) 57DateParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62DateParam::operator == (DateParam & x) 64DateParam::operator == (DateParam & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 67
66 return false; 68 return false;
67} 69}
diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp
index c5c5c85..87c7007 100644
--- a/kabc/vcard/DateValue.cpp
+++ b/kabc/vcard/DateValue.cpp
@@ -13,24 +13,26 @@
13 The above copyright notice and this permission notice shall be included in 13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qregexp.h> 24#include <qregexp.h>
25//Added by qt3to4:
26#include <Q3CString>
25 27
26#include <kdebug.h> 28#include <kdebug.h>
27 29
28#include <VCardDefines.h> 30#include <VCardDefines.h>
29#include <VCardDateValue.h> 31#include <VCardDateValue.h>
30#include <VCardValue.h> 32#include <VCardValue.h>
31 33
32using namespace VCARD; 34using namespace VCARD;
33 35
34DateValue::DateValue() 36DateValue::DateValue()
35 :Value() 37 :Value()
36{ 38{
@@ -96,40 +98,40 @@ DateValue::DateValue(const DateValue & x)
96 year_ = x.year_; 98 year_ = x.year_;
97 month_ = x.month_; 99 month_ = x.month_;
98 day_ = x.day_; 100 day_ = x.day_;
99 hour_ = x.hour_; 101 hour_ = x.hour_;
100 minute_ = x.minute_; 102 minute_ = x.minute_;
101 second_ = x.second_; 103 second_ = x.second_;
102 zoneHour_ = x.zoneHour_; 104 zoneHour_ = x.zoneHour_;
103 zoneMinute_ = x.zoneMinute_; 105 zoneMinute_ = x.zoneMinute_;
104 secFrac_ = x.secFrac_; 106 secFrac_ = x.secFrac_;
105 hasTime_ = x.hasTime_; 107 hasTime_ = x.hasTime_;
106} 108}
107 109
108DateValue::DateValue(const QCString & s) 110DateValue::DateValue(const Q3CString & s)
109 :Value(s) 111 :Value(s)
110{ 112{
111} 113}
112 114
113 DateValue & 115 DateValue &
114DateValue::operator = (DateValue & x) 116DateValue::operator = (DateValue & x)
115{ 117{
116 if (*this == x) return *this; 118 if (*this == x) return *this;
117 119
118 Value::operator = (x); 120 Value::operator = (x);
119 return *this; 121 return *this;
120} 122}
121 123
122 DateValue & 124 DateValue &
123DateValue::operator = (const QCString & s) 125DateValue::operator = (const Q3CString & s)
124{ 126{
125 Value::operator = (s); 127 Value::operator = (s);
126 return *this; 128 return *this;
127} 129}
128 130
129 bool 131 bool
130DateValue::operator == (DateValue & x) 132DateValue::operator == (DateValue & x)
131{ 133{
132 x.parse(); 134 x.parse();
133 return false; 135 return false;
134} 136}
135 137
@@ -145,116 +147,116 @@ DateValue::clone()
145 147
146 void 148 void
147DateValue::_parse() 149DateValue::_parse()
148{ 150{
149 vDebug("DateValue::_parse()"); 151 vDebug("DateValue::_parse()");
150 152
151 // date = date-full-year ["-"] date-month ["-"] date-mday 153 // date = date-full-year ["-"] date-month ["-"] date-mday
152 // time = time-hour [":"] time-minute [":"] time-second [":"] 154 // time = time-hour [":"] time-minute [":"] time-second [":"]
153 // [time-secfrac] [time-zone] 155 // [time-secfrac] [time-zone]
154 156
155 int timeSep = strRep_.find('T'); 157 int timeSep = strRep_.find('T');
156 158
157 QCString dateStr; 159 Q3CString dateStr;
158 QCString timeStr; 160 Q3CString timeStr;
159 161
160 if (timeSep == -1) { 162 if (timeSep == -1) {
161 163
162 dateStr = strRep_; 164 dateStr = strRep_;
163 vDebug("Has date string \"" + dateStr + "\""); 165 vDebug("Has date string \"" + dateStr + "\"");
164 166
165 } else { 167 } else {
166 168
167 dateStr = strRep_.left(timeSep); 169 dateStr = strRep_.left(timeSep);
168 vDebug("Has date string \"" + dateStr + "\""); 170 vDebug("Has date string \"" + dateStr + "\"");
169 171
170 timeStr = strRep_.mid(timeSep + 1); 172 timeStr = strRep_.mid(timeSep + 1);
171 vDebug("Has time string \"" + timeStr + "\""); 173 vDebug("Has time string \"" + timeStr + "\"");
172 } 174 }
173 175
174 /////////////////////////////////////////////////////////////// DATE 176 /////////////////////////////////////////////////////////////// DATE
175 177
176 dateStr.replace(QRegExp("-"), ""); 178 dateStr.replace("-", "");
177 179
178 kdDebug(5710) << "dateStr: " << dateStr << endl; 180 kdDebug(5710) << "dateStr: " << dateStr << endl;
179 181
180 year_= dateStr.left(4).toInt(); 182 year_= dateStr.left(4).toInt();
181 month_= dateStr.mid(4, 2).toInt(); 183 month_= dateStr.mid(4, 2).toInt();
182 day_= dateStr.right(2).toInt(); 184 day_= dateStr.right(2).toInt();
183 185
184 if (timeSep == -1) { 186 if (timeSep == -1) {
185 hasTime_ = false; 187 hasTime_ = false;
186 return; // No time, done. 188 return; // No time, done.
187 } 189 }
188 else 190 else
189 hasTime_ = true; 191 hasTime_ = true;
190 192
191 /////////////////////////////////////////////////////////////// TIME 193 /////////////////////////////////////////////////////////////// TIME
192 194
193 /////////////////////////////////////////////////////////////// ZONE 195 /////////////////////////////////////////////////////////////// ZONE
194 196
195 int zoneSep = timeStr.find('Z'); 197 int zoneSep = timeStr.find('Z');
196 198
197 if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { 199 if (zoneSep != -1 && timeStr.length() - zoneSep > 3) {
198 200
199 QCString zoneStr(timeStr.mid(zoneSep + 1)); 201 Q3CString zoneStr(timeStr.mid(zoneSep + 1));
200 vDebug("zoneStr == " + zoneStr); 202 vDebug("zoneStr == " + zoneStr);
201 203
202 zonePositive_= (zoneStr[0] == '+'); 204 zonePositive_= (zoneStr[0] == '+');
203 zoneHour_ = zoneStr.mid(1, 2).toInt(); 205 zoneHour_ = zoneStr.mid(1, 2).toInt();
204 zoneMinute_ = zoneStr.right(2).toInt(); 206 zoneMinute_ = zoneStr.right(2).toInt();
205 207
206 timeStr.remove(zoneSep, timeStr.length() - zoneSep); 208 timeStr.remove(zoneSep, timeStr.length() - zoneSep);
207 } 209 }
208 210
209 //////////////////////////////////////////////////// SECOND FRACTION 211 //////////////////////////////////////////////////// SECOND FRACTION
210 212
211 int secFracSep = timeStr.findRev(','); 213 int secFracSep = timeStr.findRev(',');
212 214
213 if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. 215 if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors.
214 QCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); 216 Q3CString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep);
215 secFrac_ = quirkafleeg.toDouble(); 217 secFrac_ = quirkafleeg.toDouble();
216 } 218 }
217 219
218 /////////////////////////////////////////////////////////////// HMS 220 /////////////////////////////////////////////////////////////// HMS
219 221
220 timeStr.replace(QRegExp(":"), ""); 222 timeStr.replace(":", "");
221 223
222 hour_= timeStr.left(2).toInt(); 224 hour_= timeStr.left(2).toInt();
223 minute_= timeStr.mid(2, 2).toInt(); 225 minute_= timeStr.mid(2, 2).toInt();
224 second_= timeStr.mid(4, 2).toInt(); 226 second_= timeStr.mid(4, 2).toInt();
225} 227}
226 228
227 void 229 void
228DateValue::_assemble() 230DateValue::_assemble()
229{ 231{
230 vDebug("DateValue::_assemble"); 232 vDebug("DateValue::_assemble");
231 233
232 QCString year; 234 Q3CString year;
233 QCString month; 235 Q3CString month;
234 QCString day; 236 Q3CString day;
235 237
236 year.setNum( year_ ); 238 year.setNum( year_ );
237 month.setNum( month_ ); 239 month.setNum( month_ );
238 day.setNum( day_ ); 240 day.setNum( day_ );
239 241
240 if ( month.length() < 2 ) month.prepend( "0" ); 242 if ( month.length() < 2 ) month.prepend( "0" );
241 if ( day.length() < 2 ) day.prepend( "0" ); 243 if ( day.length() < 2 ) day.prepend( "0" );
242 244
243 strRep_ = year + '-' + month + '-' + day; 245 strRep_ = year + '-' + month + '-' + day;
244 246
245 if ( hasTime_ ) { 247 if ( hasTime_ ) {
246 QCString hour; 248 Q3CString hour;
247 QCString minute; 249 Q3CString minute;
248 QCString second; 250 Q3CString second;
249 251
250 hour.setNum( hour_ ); 252 hour.setNum( hour_ );
251 minute.setNum( minute_ ); 253 minute.setNum( minute_ );
252 second.setNum( second_ ); 254 second.setNum( second_ );
253 255
254 if ( hour.length() < 2 ) hour.prepend( "0" ); 256 if ( hour.length() < 2 ) hour.prepend( "0" );
255 if ( minute.length() < 2 ) minute.prepend( "0" ); 257 if ( minute.length() < 2 ) minute.prepend( "0" );
256 if ( second.length() < 2 ) second.prepend( "0" ); 258 if ( second.length() < 2 ) second.prepend( "0" );
257 259
258 strRep_ += 'T' + hour + ':' + minute + ':' + second + 'Z'; 260 strRep_ += 'T' + hour + ':' + minute + ':' + second + 'Z';
259 } 261 }
260} 262}
diff --git a/kabc/vcard/EmailParam.cpp b/kabc/vcard/EmailParam.cpp
index 8c87477..877af60 100644
--- a/kabc/vcard/EmailParam.cpp
+++ b/kabc/vcard/EmailParam.cpp
@@ -15,59 +15,61 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardEmailParam.h> 24#include <VCardEmailParam.h>
25#include <VCardParam.h> 25#include <VCardParam.h>
26#include <VCardDefines.h> 26#include <VCardDefines.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30EmailParam::EmailParam() 32EmailParam::EmailParam()
31 :Param() 33 :Param()
32{ 34{
33 vDebug("ctor"); 35 vDebug("ctor");
34} 36}
35 37
36EmailParam::EmailParam(const EmailParam & x) 38EmailParam::EmailParam(const EmailParam & x)
37 :Param(x), 39 :Param(x),
38 emailType_(x.emailType_), 40 emailType_(x.emailType_),
39 pref_ (x.pref_) 41 pref_ (x.pref_)
40{ 42{
41} 43}
42 44
43EmailParam::EmailParam(const QCString & s) 45EmailParam::EmailParam(const Q3CString & s)
44 :Param(s) 46 :Param(s)
45{ 47{
46} 48}
47 49
48 EmailParam & 50 EmailParam &
49EmailParam::operator = (EmailParam & x) 51EmailParam::operator = (EmailParam & x)
50{ 52{
51 if (*this == x) return *this; 53 if (*this == x) return *this;
52 54
53 emailType_= x.emailType(); 55 emailType_= x.emailType();
54 pref_ = x.pref_; 56 pref_ = x.pref_;
55 57
56 Param::operator = (x); 58 Param::operator = (x);
57 return *this; 59 return *this;
58} 60}
59 61
60 EmailParam & 62 EmailParam &
61EmailParam::operator = (const QCString & s) 63EmailParam::operator = (const Q3CString & s)
62{ 64{
63 Param::operator = (s); 65 Param::operator = (s);
64 return *this; 66 return *this;
65} 67}
66 68
67 bool 69 bool
68EmailParam::operator == (EmailParam & x) 70EmailParam::operator == (EmailParam & x)
69{ 71{
70 parse(); 72 parse();
71 73
72 if (pref_) 74 if (pref_)
73 return (x.pref_ && x.emailType() == emailType_); 75 return (x.pref_ && x.emailType() == emailType_);
diff --git a/kabc/vcard/Entity.cpp b/kabc/vcard/Entity.cpp
index b7d09e0..e38fa11 100644
--- a/kabc/vcard/Entity.cpp
+++ b/kabc/vcard/Entity.cpp
@@ -13,102 +13,104 @@
13 The above copyright notice and this permission notice shall be included in 13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardEntity.h> 24#include <VCardEntity.h>
25//Added by qt3to4:
26#include <Q3CString>
25 27
26using namespace VCARD; 28using namespace VCARD;
27 29
28Entity::Entity() 30Entity::Entity()
29 : parsed_ (false), 31 : parsed_ (false),
30 assembled_(true) 32 assembled_(true)
31{ 33{
32 // empty 34 // empty
33} 35}
34 36
35Entity::Entity(const Entity & e) 37Entity::Entity(const Entity & e)
36 : strRep_ (e.strRep_), 38 : strRep_ (e.strRep_),
37 parsed_ (e.parsed_), 39 parsed_ (e.parsed_),
38 assembled_(e.assembled_) 40 assembled_(e.assembled_)
39{ 41{
40 // empty 42 // empty
41} 43}
42 44
43Entity::Entity(const QCString & s) 45Entity::Entity(const Q3CString & s)
44 : strRep_ (s), 46 : strRep_ (s),
45 parsed_ (false), 47 parsed_ (false),
46 assembled_(true) 48 assembled_(true)
47{ 49{
48 // empty 50 // empty
49} 51}
50 52
51 Entity & 53 Entity &
52Entity::operator = (const Entity & e) 54Entity::operator = (const Entity & e)
53{ 55{
54 if (this == &e) return *this; 56 if (this == &e) return *this;
55 57
56 strRep_ = e.strRep_; 58 strRep_ = e.strRep_;
57 parsed_ = e.parsed_; 59 parsed_ = e.parsed_;
58 assembled_= e.assembled_; 60 assembled_= e.assembled_;
59 61
60 return *this; 62 return *this;
61} 63}
62 64
63 Entity & 65 Entity &
64Entity::operator = (const QCString & s) 66Entity::operator = (const Q3CString & s)
65{ 67{
66 strRep_ = s; 68 strRep_ = s;
67 parsed_ = false; 69 parsed_ = false;
68 assembled_= true; 70 assembled_= true;
69 71
70 return *this; 72 return *this;
71} 73}
72 74
73 bool 75 bool
74Entity::operator == (Entity & e) 76Entity::operator == (Entity & e)
75{ 77{
76 return asString() == e.asString(); 78 return asString() == e.asString();
77} 79}
78 80
79 bool 81 bool
80Entity::operator != (Entity & e) 82Entity::operator != (Entity & e)
81{ 83{
82 return !(*this == e); 84 return !(*this == e);
83} 85}
84 86
85 bool 87 bool
86Entity::operator == (const QCString & s) 88Entity::operator == (const Q3CString & s)
87{ 89{
88 return asString() == s; 90 return asString() == s;
89} 91}
90 92
91 bool 93 bool
92Entity::operator != (const QCString & s) 94Entity::operator != (const Q3CString & s)
93{ 95{
94 return !(*this == s); 96 return !(*this == s);
95} 97}
96 98
97Entity::~Entity() 99Entity::~Entity()
98{ 100{
99 // empty 101 // empty
100} 102}
101 103
102 QCString 104 Q3CString
103Entity::asString() 105Entity::asString()
104{ 106{
105 //vDebug("Entity::asString()"); 107 //vDebug("Entity::asString()");
106 assemble(); 108 assemble();
107 109
108 return strRep_; 110 return strRep_;
109} 111}
110 112
111 void 113 void
112Entity::parse() 114Entity::parse()
113{ 115{
114 //vDebug( "Entity::parse()" ); 116 //vDebug( "Entity::parse()" );
diff --git a/kabc/vcard/Enum.cpp b/kabc/vcard/Enum.cpp
index cc48b5a..036324c 100644
--- a/kabc/vcard/Enum.cpp
+++ b/kabc/vcard/Enum.cpp
@@ -12,33 +12,33 @@
12 12
13 The above copyright notice and this permission notice shall be included in 13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25#include <ctype.h> 25#include <ctype.h>
26 26
27#include <VCardEnum.h> 27#include <VCardEnum.h>
28 28
29using namespace VCARD; 29using namespace VCARD;
30 30
31// There are 31 possible types, not including extensions. 31// There are 31 possible types, not including extensions.
32 const QCString 32 const Q3CString
33VCARD::paramNames [] = 33VCARD::paramNames [] =
34{ 34{
35 "NAME", 35 "NAME",
36 "PROFILE", 36 "PROFILE",
37 "SOURCE", 37 "SOURCE",
38 "FN", 38 "FN",
39 "N", 39 "N",
40 "NICKNAME", 40 "NICKNAME",
41 "PHOTO", 41 "PHOTO",
42 "BDAY", 42 "BDAY",
43 "ADR", 43 "ADR",
44 "LABEL", 44 "LABEL",
@@ -213,33 +213,33 @@ VCARD::EntityTypeToValueType(EntityType e)
213 case EntityVersion: 213 case EntityVersion:
214 case EntityProfile: 214 case EntityProfile:
215 case EntityUID: 215 case EntityUID:
216 case EntityNote: 216 case EntityNote:
217 default: t = ValueText; break; 217 default: t = ValueText; break;
218 //---------------------------------------------------------------// 218 //---------------------------------------------------------------//
219 219
220 } 220 }
221 221
222 return t; 222 return t;
223} 223}
224 224
225 QCString 225 Q3CString
226VCARD::EntityTypeToParamName(EntityType e) 226VCARD::EntityTypeToParamName(EntityType e)
227{ 227{
228 if ( e > EntityUnknown ) e = EntityUnknown; 228 if ( e > EntityUnknown ) e = EntityUnknown;
229 return paramNames[ int( e ) ]; 229 return paramNames[ int( e ) ];
230} 230}
231 231
232 EntityType 232 EntityType
233VCARD::EntityNameToEntityType(const QCString & s) 233VCARD::EntityNameToEntityType(const Q3CString & s)
234{ 234{
235 if (s.isEmpty()) return EntityUnknown; 235 if (s.isEmpty()) return EntityUnknown;
236 236
237 EntityType t(EntityUnknown); 237 EntityType t(EntityUnknown);
238 238
239 switch (s[0]) { 239 switch (s[0]) {
240 240
241 case 'A': 241 case 'A':
242 if (s == "ADR") 242 if (s == "ADR")
243 t = EntityAddress; 243 t = EntityAddress;
244 else if (s == "AGENT") 244 else if (s == "AGENT")
245 t = EntityAgent; 245 t = EntityAgent;
diff --git a/kabc/vcard/FloatValue.cpp b/kabc/vcard/FloatValue.cpp
index 15bb664..7065081 100644
--- a/kabc/vcard/FloatValue.cpp
+++ b/kabc/vcard/FloatValue.cpp
@@ -15,64 +15,66 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardFloatValue.h> 24#include <VCardFloatValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30FloatValue::FloatValue() 32FloatValue::FloatValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35FloatValue::FloatValue(float f) 37FloatValue::FloatValue(float f)
36 : Value(), 38 : Value(),
37 value_(f) 39 value_(f)
38{ 40{
39 parsed_ = true; 41 parsed_ = true;
40} 42}
41 43
42FloatValue::FloatValue(const FloatValue & x) 44FloatValue::FloatValue(const FloatValue & x)
43 :Value(x) 45 :Value(x)
44{ 46{
45 value_ = x.value_; 47 value_ = x.value_;
46} 48}
47 49
48FloatValue::FloatValue(const QCString & s) 50FloatValue::FloatValue(const Q3CString & s)
49 :Value(s) 51 :Value(s)
50{ 52{
51} 53}
52 54
53 FloatValue & 55 FloatValue &
54FloatValue::operator = (FloatValue & x) 56FloatValue::operator = (FloatValue & x)
55{ 57{
56 if (*this == x) return *this; 58 if (*this == x) return *this;
57 59
58 x.parse(); 60 x.parse();
59 value_ = x.value_; 61 value_ = x.value_;
60 62
61 Value::operator = (x); 63 Value::operator = (x);
62 return *this; 64 return *this;
63} 65}
64 66
65 FloatValue & 67 FloatValue &
66FloatValue::operator = (const QCString & s) 68FloatValue::operator = (const Q3CString & s)
67{ 69{
68 Value::operator = (s); 70 Value::operator = (s);
69 return *this; 71 return *this;
70} 72}
71 73
72 bool 74 bool
73FloatValue::operator == (FloatValue & x) 75FloatValue::operator == (FloatValue & x)
74{ 76{
75 x.parse(); 77 x.parse();
76 return (value_ == x.value_); 78 return (value_ == x.value_);
77} 79}
78 80
@@ -92,25 +94,25 @@ FloatValue::_parse()
92 94
93 strRep_.remove(0, 1); 95 strRep_.remove(0, 1);
94 } 96 }
95 97
96 value_ = strRep_.toFloat(); 98 value_ = strRep_.toFloat();
97 if (negative) 99 if (negative)
98 value_ = -value_; 100 value_ = -value_;
99} 101}
100 102
101 void 103 void
102FloatValue::_assemble() 104FloatValue::_assemble()
103{ 105{
104 strRep_ = QCString().setNum(value_); 106 strRep_ = Q3CString().setNum(value_);
105} 107}
106 108
107 float 109 float
108FloatValue::value() 110FloatValue::value()
109{ 111{
110 parse(); 112 parse();
111 return value_; 113 return value_;
112} 114}
113 115
114 void 116 void
115FloatValue::setValue(float f) 117FloatValue::setValue(float f)
116{ 118{
diff --git a/kabc/vcard/GeoValue.cpp b/kabc/vcard/GeoValue.cpp
index e02b402..ba57a6b 100644
--- a/kabc/vcard/GeoValue.cpp
+++ b/kabc/vcard/GeoValue.cpp
@@ -14,56 +14,58 @@
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <VCardGeoValue.h> 21#include <VCardGeoValue.h>
22 22
23#include <VCardValue.h> 23#include <VCardValue.h>
24 24
25#include <kdebug.h> 25#include <kdebug.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27using namespace VCARD; 29using namespace VCARD;
28 30
29GeoValue::GeoValue() 31GeoValue::GeoValue()
30 :Value() 32 :Value()
31{ 33{
32} 34}
33 35
34GeoValue::GeoValue(const GeoValue & x) 36GeoValue::GeoValue(const GeoValue & x)
35 :Value(x), latitude_(x.latitude_), longitude_(x.longitude_) 37 :Value(x), latitude_(x.latitude_), longitude_(x.longitude_)
36{ 38{
37} 39}
38 40
39GeoValue::GeoValue(const QCString & s) 41GeoValue::GeoValue(const Q3CString & s)
40 :Value(s) 42 :Value(s)
41{ 43{
42} 44}
43 45
44 GeoValue & 46 GeoValue &
45GeoValue::operator = (GeoValue & x) 47GeoValue::operator = (GeoValue & x)
46{ 48{
47 if (*this == x) return *this; 49 if (*this == x) return *this;
48 50
49 latitude_ = x.latitude_; 51 latitude_ = x.latitude_;
50 longitude_ = x.longitude_; 52 longitude_ = x.longitude_;
51 53
52 Value::operator = (x); 54 Value::operator = (x);
53 return *this; 55 return *this;
54} 56}
55 57
56 GeoValue & 58 GeoValue &
57GeoValue::operator = (const QCString & s) 59GeoValue::operator = (const Q3CString & s)
58{ 60{
59 Value::operator = (s); 61 Value::operator = (s);
60 return *this; 62 return *this;
61} 63}
62 64
63 bool 65 bool
64GeoValue::operator == (GeoValue & x) 66GeoValue::operator == (GeoValue & x)
65{ 67{
66 x.parse(); 68 x.parse();
67 69
68 if ( latitude_ != x.latitude_ ) return false; 70 if ( latitude_ != x.latitude_ ) return false;
69 if ( longitude_ != x.longitude_ ) return false; 71 if ( longitude_ != x.longitude_ ) return false;
diff --git a/kabc/vcard/ImageParam.cpp b/kabc/vcard/ImageParam.cpp
index c9cf6fd..6da317d 100644
--- a/kabc/vcard/ImageParam.cpp
+++ b/kabc/vcard/ImageParam.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardImageParam.h> 24#include <VCardImageParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30ImageParam::ImageParam() 32ImageParam::ImageParam()
31 :Param() 33 :Param()
32{ 34{
33} 35}
34 36
35ImageParam::ImageParam(const ImageParam & x) 37ImageParam::ImageParam(const ImageParam & x)
36 :Param(x) 38 :Param(x)
37{ 39{
38} 40}
39 41
40ImageParam::ImageParam(const QCString & s) 42ImageParam::ImageParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
44 46
45 ImageParam & 47 ImageParam &
46ImageParam::operator = (ImageParam & x) 48ImageParam::operator = (ImageParam & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Param::operator = (x); 52 Param::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 ImageParam & 56 ImageParam &
55ImageParam::operator = (const QCString & s) 57ImageParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62ImageParam::operator == (ImageParam & x) 64ImageParam::operator == (ImageParam & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/ImageValue.cpp b/kabc/vcard/ImageValue.cpp
index 4630fac..678a81c 100644
--- a/kabc/vcard/ImageValue.cpp
+++ b/kabc/vcard/ImageValue.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardImageValue.h> 24#include <VCardImageValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30ImageValue::ImageValue() 32ImageValue::ImageValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35ImageValue::ImageValue(const ImageValue & x) 37ImageValue::ImageValue(const ImageValue & x)
36 :Value(x) 38 :Value(x)
37{ 39{
38} 40}
39 41
40ImageValue::ImageValue(const QCString & s) 42ImageValue::ImageValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
44 46
45 ImageValue & 47 ImageValue &
46ImageValue::operator = (ImageValue & x) 48ImageValue::operator = (ImageValue & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Value::operator = (x); 52 Value::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 ImageValue & 56 ImageValue &
55ImageValue::operator = (const QCString & s) 57ImageValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62ImageValue::operator == (ImageValue & x) 64ImageValue::operator == (ImageValue & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/ImgValue.cpp b/kabc/vcard/ImgValue.cpp
index 7b961f8..1b289df 100644
--- a/kabc/vcard/ImgValue.cpp
+++ b/kabc/vcard/ImgValue.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardImgValue.h> 24#include <VCardImgValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30ImgValue::ImgValue() 32ImgValue::ImgValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35ImgValue::ImgValue(const ImgValue & x) 37ImgValue::ImgValue(const ImgValue & x)
36 :Value(x) 38 :Value(x)
37{ 39{
38} 40}
39 41
40ImgValue::ImgValue(const QCString & s) 42ImgValue::ImgValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
44 46
45 ImgValue & 47 ImgValue &
46ImgValue::operator = (ImgValue & x) 48ImgValue::operator = (ImgValue & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Value::operator = (x); 52 Value::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 ImgValue & 56 ImgValue &
55ImgValue::operator = (const QCString & s) 57ImgValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62ImgValue::operator == (ImgValue & x) 64ImgValue::operator == (ImgValue & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp
index edf1804..52a0204 100644
--- a/kabc/vcard/LangValue.cpp
+++ b/kabc/vcard/LangValue.cpp
@@ -17,111 +17,115 @@
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardRToken.h> 24#include <VCardRToken.h>
25 25
26#include <VCardLangValue.h> 26#include <VCardLangValue.h>
27 27
28#include <VCardValue.h> 28#include <VCardValue.h>
29//Added by qt3to4:
30#include <Q3CString>
31#include <Q3StrList>
29 32
30using namespace VCARD; 33using namespace VCARD;
31 34
32LangValue::LangValue() 35LangValue::LangValue()
33 :Value() 36 :Value()
34{ 37{
35} 38}
36 39
37LangValue::LangValue(const LangValue & x) 40LangValue::LangValue(const LangValue & x)
38 :Value(x) 41 :Value(x)
39{ 42{
40} 43}
41 44
42LangValue::LangValue(const QCString & s) 45LangValue::LangValue(const Q3CString & s)
43 :Value(s) 46 :Value(s)
44{ 47{
45} 48}
46 49
47 LangValue & 50 LangValue &
48LangValue::operator = (LangValue & x) 51LangValue::operator = (LangValue & x)
49{ 52{
50 if (*this == x) return *this; 53 if (*this == x) return *this;
51 54
52 Value::operator = (x); 55 Value::operator = (x);
53 return *this; 56 return *this;
54} 57}
55 58
56 LangValue & 59 LangValue &
57LangValue::operator = (const QCString & s) 60LangValue::operator = (const Q3CString & s)
58{ 61{
59 Value::operator = (s); 62 Value::operator = (s);
60 return *this; 63 return *this;
61} 64}
62 65
63 bool 66 bool
64LangValue::operator == (LangValue & x) 67LangValue::operator == (LangValue & x)
65{ 68{
66 x.parse(); 69 x.parse();
67 return false; 70 return false;
68} 71}
69 72
70LangValue::~LangValue() 73LangValue::~LangValue()
71{ 74{
72} 75}
73 76
74 void 77 void
75LangValue::_parse() 78LangValue::_parse()
76{ 79{
77 QStrList l; 80 Q3StrList l;
78 RTokenise(strRep_, "-", l); 81 RTokenise(strRep_, "-", l);
79 82
80 if (l.count() == 0) return; 83 if (l.count() == 0) return;
81 84
82 primary_ = l.at(0); 85 primary_ = l.at(0);
83 86
84 l.remove(0u); 87 l.remove(0u);
85 88
86 subtags_ = l; 89 subtags_ = l;
87} 90}
88 91
89 void 92 void
90LangValue::_assemble() 93LangValue::_assemble()
91{ 94{
92 strRep_ = primary_; 95 strRep_ = primary_;
93 96
94 QStrListIterator it(subtags_); 97 Q3StrListIterator it(subtags_);
95 98
96 for (; it.current(); ++it) 99 for (; it.current(); ++it) {
97 strRep_ += QCString('-') + it.current(); 100 strRep_ += Q3CString('-'); strRep_ += it.current();
101 }
98} 102}
99 103
100 QCString 104 Q3CString
101LangValue::primary() 105LangValue::primary()
102{ 106{
103 parse(); 107 parse();
104 return primary_; 108 return primary_;
105} 109}
106 110
107 QStrList 111 Q3StrList
108LangValue::subtags() 112LangValue::subtags()
109{ 113{
110 parse(); 114 parse();
111 return subtags_; 115 return subtags_;
112} 116}
113 117
114 void 118 void
115LangValue::setPrimary(const QCString & s) 119LangValue::setPrimary(const Q3CString & s)
116{ 120{
117 parse(); 121 parse();
118 primary_ = s; 122 primary_ = s;
119} 123}
120 124
121 void 125 void
122LangValue::setSubTags(const QStrList & l) 126LangValue::setSubTags(const Q3StrList & l)
123{ 127{
124 parse(); 128 parse();
125 subtags_ = l; 129 subtags_ = l;
126} 130}
127 131
diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp
index cdec621..6c0f365 100644
--- a/kabc/vcard/NValue.cpp
+++ b/kabc/vcard/NValue.cpp
@@ -12,72 +12,74 @@
12 12
13 The above copyright notice and this permission notice shall be included in 13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qstrlist.h> 24#include <q3strlist.h>
25//Added by qt3to4:
26#include <Q3CString>
25 27
26#include <VCardRToken.h> 28#include <VCardRToken.h>
27#include <VCardNValue.h> 29#include <VCardNValue.h>
28#include <VCardValue.h> 30#include <VCardValue.h>
29#include <VCardDefines.h> 31#include <VCardDefines.h>
30 32
31using namespace VCARD; 33using namespace VCARD;
32 34
33NValue::NValue() 35NValue::NValue()
34 :Value() 36 :Value()
35{ 37{
36 vDebug("ctor"); 38 vDebug("ctor");
37} 39}
38 40
39NValue::NValue(const NValue & x) 41NValue::NValue(const NValue & x)
40 :Value(x), 42 :Value(x),
41 family_(x.family_), 43 family_(x.family_),
42 given_(x.given_), 44 given_(x.given_),
43 middle_(x.middle_), 45 middle_(x.middle_),
44 prefix_(x.prefix_), 46 prefix_(x.prefix_),
45 suffix_(x.suffix_) 47 suffix_(x.suffix_)
46{ 48{
47} 49}
48 50
49NValue::NValue(const QCString & s) 51NValue::NValue(const Q3CString & s)
50 :Value(s) 52 :Value(s)
51{ 53{
52 vDebug("ctor"); 54 vDebug("ctor");
53} 55}
54 56
55 NValue & 57 NValue &
56NValue::operator = (NValue & x) 58NValue::operator = (NValue & x)
57{ 59{
58 if (*this == x) return *this; 60 if (*this == x) return *this;
59 61
60 family_= x.family_; 62 family_= x.family_;
61 given_= x.given_; 63 given_= x.given_;
62 middle_= x.middle_; 64 middle_= x.middle_;
63 prefix_= x.prefix_; 65 prefix_= x.prefix_;
64 suffix_= x.suffix_; 66 suffix_= x.suffix_;
65 67
66 Value::operator = (x); 68 Value::operator = (x);
67 return *this; 69 return *this;
68} 70}
69 71
70 NValue & 72 NValue &
71NValue::operator = (const QCString & s) 73NValue::operator = (const Q3CString & s)
72{ 74{
73 Value::operator = (s); 75 Value::operator = (s);
74 return *this; 76 return *this;
75} 77}
76 78
77 bool 79 bool
78NValue::operator == (NValue & x) 80NValue::operator == (NValue & x)
79{ 81{
80 x.parse(); 82 x.parse();
81 83
82 return ( 84 return (
83 family_ == x.family_&& 85 family_ == x.family_&&
@@ -91,25 +93,25 @@ NValue::~NValue()
91{ 93{
92} 94}
93 95
94 NValue * 96 NValue *
95NValue::clone() 97NValue::clone()
96{ 98{
97 return new NValue( *this ); 99 return new NValue( *this );
98} 100}
99 101
100 void 102 void
101NValue::_parse() 103NValue::_parse()
102{ 104{
103 QStrList l; 105 Q3StrList l;
104 RTokenise(strRep_, ";", l); 106 RTokenise(strRep_, ";", l);
105 107
106 for (unsigned int i = 0; i < l.count(); i++) { 108 for (unsigned int i = 0; i < l.count(); i++) {
107 109
108 switch (i) { 110 switch (i) {
109 case 0: family_ = l.at(0);break; 111 case 0: family_ = l.at(0);break;
110 case 1: given_ = l.at(1);break; 112 case 1: given_ = l.at(1);break;
111 case 2: middle_ = l.at(2);break; 113 case 2: middle_ = l.at(2);break;
112 case 3: prefix_ = l.at(3);break; 114 case 3: prefix_ = l.at(3);break;
113 case 4: suffix_ = l.at(4);break; 115 case 4: suffix_ = l.at(4);break;
114 default: break; 116 default: break;
115 } 117 }
diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp
index c3134c8..a6a32dd 100644
--- a/kabc/vcard/OrgValue.cpp
+++ b/kabc/vcard/OrgValue.cpp
@@ -17,53 +17,55 @@
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardRToken.h> 24#include <VCardRToken.h>
25 25
26#include <VCardOrgValue.h> 26#include <VCardOrgValue.h>
27 27
28#include <VCardValue.h> 28#include <VCardValue.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
32OrgValue::OrgValue() 34OrgValue::OrgValue()
33 :Value() 35 :Value()
34{ 36{
35} 37}
36 38
37OrgValue::OrgValue(const OrgValue & x) 39OrgValue::OrgValue(const OrgValue & x)
38 :Value(x) 40 :Value(x)
39{ 41{
40} 42}
41 43
42OrgValue::OrgValue(const QCString & s) 44OrgValue::OrgValue(const Q3CString & s)
43 :Value(s) 45 :Value(s)
44{ 46{
45} 47}
46 48
47 OrgValue & 49 OrgValue &
48OrgValue::operator = (OrgValue & x) 50OrgValue::operator = (OrgValue & x)
49{ 51{
50 if (*this == x) return *this; 52 if (*this == x) return *this;
51 53
52 Value::operator = (x); 54 Value::operator = (x);
53 return *this; 55 return *this;
54} 56}
55 57
56 OrgValue & 58 OrgValue &
57OrgValue::operator = (const QCString & s) 59OrgValue::operator = (const Q3CString & s)
58{ 60{
59 Value::operator = (s); 61 Value::operator = (s);
60 return *this; 62 return *this;
61} 63}
62 64
63 bool 65 bool
64OrgValue::operator == (OrgValue & x) 66OrgValue::operator == (OrgValue & x)
65{ 67{
66 x.parse(); 68 x.parse();
67 return false; 69 return false;
68} 70}
69 71
@@ -73,35 +75,35 @@ OrgValue::~OrgValue()
73 75
74 void 76 void
75OrgValue::_parse() 77OrgValue::_parse()
76{ 78{
77 RTokenise(strRep_, ";", valueList_); 79 RTokenise(strRep_, ";", valueList_);
78} 80}
79 81
80 void 82 void
81OrgValue::_assemble() 83OrgValue::_assemble()
82{ 84{
83 bool first(true); 85 bool first(true);
84 86
85 QStrListIterator it(valueList_); 87 Q3StrListIterator it(valueList_);
86 88
87 for (; it.current(); ++it) { 89 for (; it.current(); ++it) {
88 if (!first) strRep_ += ';'; 90 if (!first) strRep_ += ';';
89 strRep_ += it.current(); 91 strRep_ += it.current();
90 first = false; 92 first = false;
91 } 93 }
92} 94}
93 95
94 unsigned int 96 unsigned int
95OrgValue::numValues() 97OrgValue::numValues()
96{ 98{
97 parse(); 99 parse();
98 return valueList_.count(); 100 return valueList_.count();
99} 101}
100 102
101 QCString 103 Q3CString
102OrgValue::value(unsigned int i) 104OrgValue::value(unsigned int i)
103{ 105{
104 parse(); 106 parse();
105 return valueList_.at(i); 107 return valueList_.at(i);
106} 108}
107 109
diff --git a/kabc/vcard/Param.cpp b/kabc/vcard/Param.cpp
index c513613..bd6b299 100644
--- a/kabc/vcard/Param.cpp
+++ b/kabc/vcard/Param.cpp
@@ -17,62 +17,64 @@
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardParam.h> 24#include <VCardParam.h>
25 25
26#include <VCardEntity.h> 26#include <VCardEntity.h>
27 27
28#include <VCardRToken.h> 28#include <VCardRToken.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
32Param::Param() 34Param::Param()
33 :Entity(), 35 :Entity(),
34 name_(""), 36 name_(""),
35 value_("") 37 value_("")
36{ 38{
37} 39}
38 40
39Param::Param(const Param & x) 41Param::Param(const Param & x)
40 :Entity(x), 42 :Entity(x),
41 name_(x.name_), 43 name_(x.name_),
42 value_(x.value_) 44 value_(x.value_)
43{ 45{
44} 46}
45 47
46Param::Param(const QCString & s) 48Param::Param(const Q3CString & s)
47 :Entity(s), 49 :Entity(s),
48 name_(""), 50 name_(""),
49 value_("") 51 value_("")
50{ 52{
51} 53}
52 54
53 Param & 55 Param &
54Param::operator = (Param & x) 56Param::operator = (Param & x)
55{ 57{
56 if (*this == x) return *this; 58 if (*this == x) return *this;
57 59
58 Entity::operator = (x); 60 Entity::operator = (x);
59 name_ = x.name_; 61 name_ = x.name_;
60 value_ = x.value_; 62 value_ = x.value_;
61 63
62 return *this; 64 return *this;
63} 65}
64 66
65 Param & 67 Param &
66Param::operator = (const QCString & s) 68Param::operator = (const Q3CString & s)
67{ 69{
68 Entity::operator = (s); 70 Entity::operator = (s);
69 return *this; 71 return *this;
70} 72}
71 73
72 bool 74 bool
73Param::operator == (Param & x) 75Param::operator == (Param & x)
74{ 76{
75 x.parse(); 77 x.parse();
76 return false; 78 return false;
77} 79}
78 80
@@ -82,48 +84,48 @@ Param::~Param()
82 84
83 void 85 void
84Param::_parse() 86Param::_parse()
85{ 87{
86} 88}
87 89
88 void 90 void
89Param::_assemble() 91Param::_assemble()
90{ 92{
91 strRep_ = name_ + "=" + value_; 93 strRep_ = name_ + "=" + value_;
92} 94}
93 95
94Param::Param(const QCString &name, const QCString &value) 96Param::Param(const Q3CString &name, const Q3CString &value)
95 :Entity(), 97 :Entity(),
96 name_(name), 98 name_(name),
97 value_(value) 99 value_(value)
98{ 100{
99 parsed_ = true; 101 parsed_ = true;
100 assembled_ = false; 102 assembled_ = false;
101} 103}
102 104
103 void 105 void
104Param::setName(const QCString & name) 106Param::setName(const Q3CString & name)
105{ 107{
106 name_ = name; 108 name_ = name;
107 109
108 assembled_ = false; 110 assembled_ = false;
109} 111}
110 112
111 void 113 void
112Param::setValue(const QCString & value) 114Param::setValue(const Q3CString & value)
113{ 115{
114 value_ = value; 116 value_ = value;
115 117
116 assembled_ = false; 118 assembled_ = false;
117} 119}
118 120
119 QCString 121 Q3CString
120Param::name() 122Param::name()
121{ 123{
122 return name_; 124 return name_;
123} 125}
124 126
125 QCString 127 Q3CString
126Param::value() 128Param::value()
127{ 129{
128 return value_; 130 return value_;
129} 131}
diff --git a/kabc/vcard/PhoneNumberValue.cpp b/kabc/vcard/PhoneNumberValue.cpp
index 17b1400..57aa336 100644
--- a/kabc/vcard/PhoneNumberValue.cpp
+++ b/kabc/vcard/PhoneNumberValue.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardPhoneNumberValue.h> 24#include <VCardPhoneNumberValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30PhoneNumberValue::PhoneNumberValue() 32PhoneNumberValue::PhoneNumberValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x) 37PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x)
36 :Value(x) 38 :Value(x)
37{ 39{
38} 40}
39 41
40PhoneNumberValue::PhoneNumberValue(const QCString & s) 42PhoneNumberValue::PhoneNumberValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
44 46
45 PhoneNumberValue & 47 PhoneNumberValue &
46PhoneNumberValue::operator = (PhoneNumberValue & x) 48PhoneNumberValue::operator = (PhoneNumberValue & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Value::operator = (x); 52 Value::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 PhoneNumberValue & 56 PhoneNumberValue &
55PhoneNumberValue::operator = (const QCString & s) 57PhoneNumberValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62PhoneNumberValue::operator == (PhoneNumberValue & x) 64PhoneNumberValue::operator == (PhoneNumberValue & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/RToken.cpp b/kabc/vcard/RToken.cpp
index 2a85820..8fc0558 100644
--- a/kabc/vcard/RToken.cpp
+++ b/kabc/vcard/RToken.cpp
@@ -15,32 +15,32 @@
15 all copies or substantial portions of the Software. 15 all copies or substantial portions of the Software.
16 16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 20 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23*/ 23*/
24 24
25#include <string.h> 25#include <string.h>
26#include <stddef.h> 26#include <stddef.h>
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30namespace VCARD 30namespace VCARD
31{ 31{
32 32
33 Q_UINT32 33 Q_UINT32
34RTokenise(const char * str, const char * delim, QStrList & l) 34RTokenise(const char * str, const char * delim, Q3StrList & l)
35{ 35{
36 // FIXME no stderr ! 36 // FIXME no stderr !
37 l.clear(); 37 l.clear();
38 38
39 if (!delim || !str || strlen(delim) == 0 || strlen(str) == 0) return 0; 39 if (!delim || !str || strlen(delim) == 0 || strlen(str) == 0) return 0;
40 40
41 char * len = (char *)(str + strlen(str));// End of string. 41 char * len = (char *)(str + strlen(str));// End of string.
42 42
43 register char * rstart = new char[strlen(str) + 1]; 43 register char * rstart = new char[strlen(str) + 1];
44 register char * r = rstart; 44 register char * r = rstart;
45 45
46 46
diff --git a/kabc/vcard/SoundValue.cpp b/kabc/vcard/SoundValue.cpp
index 81040d1..4d098d2 100644
--- a/kabc/vcard/SoundValue.cpp
+++ b/kabc/vcard/SoundValue.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardSoundValue.h> 24#include <VCardSoundValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30SoundValue::SoundValue() 32SoundValue::SoundValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35SoundValue::SoundValue(const SoundValue & x) 37SoundValue::SoundValue(const SoundValue & x)
36 :Value(x) 38 :Value(x)
37{ 39{
38} 40}
39 41
40SoundValue::SoundValue(const QCString & s) 42SoundValue::SoundValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
44 46
45 SoundValue & 47 SoundValue &
46SoundValue::operator = (SoundValue & x) 48SoundValue::operator = (SoundValue & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Value::operator = (x); 52 Value::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 SoundValue & 56 SoundValue &
55SoundValue::operator = (const QCString & s) 57SoundValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62SoundValue::operator == (SoundValue & x) 64SoundValue::operator == (SoundValue & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp
index cd51cbd..8f02113 100644
--- a/kabc/vcard/SourceParam.cpp
+++ b/kabc/vcard/SourceParam.cpp
@@ -15,61 +15,63 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardSourceParam.h> 24#include <VCardSourceParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30SourceParam::SourceParam() 32SourceParam::SourceParam()
31 :Param(), 33 :Param(),
32 type_(SourceParam::TypeUnknown) 34 type_(SourceParam::TypeUnknown)
33{ 35{
34} 36}
35 37
36SourceParam::SourceParam(const SourceParam & x) 38SourceParam::SourceParam(const SourceParam & x)
37 :Param(x), 39 :Param(x),
38 type_(x.type_), 40 type_(x.type_),
39 par_(x.par_), 41 par_(x.par_),
40 val_(x.val_) 42 val_(x.val_)
41{ 43{
42} 44}
43 45
44SourceParam::SourceParam(const QCString & s) 46SourceParam::SourceParam(const Q3CString & s)
45 :Param(s), 47 :Param(s),
46 type_(SourceParam::TypeUnknown) 48 type_(SourceParam::TypeUnknown)
47{ 49{
48} 50}
49 51
50 SourceParam & 52 SourceParam &
51SourceParam::operator = (SourceParam & x) 53SourceParam::operator = (SourceParam & x)
52{ 54{
53 if (*this == x) return *this; 55 if (*this == x) return *this;
54 type_= x.type(); 56 type_= x.type();
55 par_= x.par(); 57 par_= x.par();
56 val_= x.val(); 58 val_= x.val();
57 59
58 Param::operator = (x); 60 Param::operator = (x);
59 return *this; 61 return *this;
60} 62}
61 63
62 SourceParam & 64 SourceParam &
63SourceParam::operator = (const QCString & s) 65SourceParam::operator = (const Q3CString & s)
64{ 66{
65 Param::operator = (s); 67 Param::operator = (s);
66 return *this; 68 return *this;
67} 69}
68 70
69 bool 71 bool
70SourceParam::operator == (SourceParam & x) 72SourceParam::operator == (SourceParam & x)
71{ 73{
72 x.parse(); 74 x.parse();
73 return false; 75 return false;
74} 76}
75 77
diff --git a/kabc/vcard/TelParam.cpp b/kabc/vcard/TelParam.cpp
index 9d9fe4d..4bc8b6a 100644
--- a/kabc/vcard/TelParam.cpp
+++ b/kabc/vcard/TelParam.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardTelParam.h> 24#include <VCardTelParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30TelParam::TelParam() 32TelParam::TelParam()
31 :Param() 33 :Param()
32{ 34{
33} 35}
34 36
35TelParam::TelParam(const TelParam & x) 37TelParam::TelParam(const TelParam & x)
36 :Param(x) 38 :Param(x)
37{ 39{
38} 40}
39 41
40TelParam::TelParam(const QCString & s) 42TelParam::TelParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
44 46
45 TelParam & 47 TelParam &
46TelParam::operator = (TelParam & x) 48TelParam::operator = (TelParam & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Param::operator = (x); 52 Param::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 TelParam & 56 TelParam &
55TelParam::operator = (const QCString & s) 57TelParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62TelParam::operator == (TelParam & x) 64TelParam::operator == (TelParam & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/TelValue.cpp b/kabc/vcard/TelValue.cpp
index 349f99a..d9cbf3e 100644
--- a/kabc/vcard/TelValue.cpp
+++ b/kabc/vcard/TelValue.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardTelValue.h> 24#include <VCardTelValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30TelValue::TelValue() 32TelValue::TelValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35TelValue::TelValue(const TelValue & x) 37TelValue::TelValue(const TelValue & x)
36 :Value(x) 38 :Value(x)
37{ 39{
38} 40}
39 41
40TelValue::TelValue(const QCString & s) 42TelValue::TelValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
44 46
45 TelValue & 47 TelValue &
46TelValue::operator = (TelValue & x) 48TelValue::operator = (TelValue & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Value::operator = (x); 52 Value::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 TelValue & 56 TelValue &
55TelValue::operator = (const QCString & s) 57TelValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62TelValue::operator == (TelValue & x) 64TelValue::operator == (TelValue & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/TextBinParam.cpp b/kabc/vcard/TextBinParam.cpp
index 66f2946..2866c12 100644
--- a/kabc/vcard/TextBinParam.cpp
+++ b/kabc/vcard/TextBinParam.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardTextBinParam.h> 24#include <VCardTextBinParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30TextBinParam::TextBinParam() 32TextBinParam::TextBinParam()
31 :Param() 33 :Param()
32{ 34{
33} 35}
34 36
35TextBinParam::TextBinParam(const TextBinParam & x) 37TextBinParam::TextBinParam(const TextBinParam & x)
36 :Param(x) 38 :Param(x)
37{ 39{
38} 40}
39 41
40TextBinParam::TextBinParam(const QCString & s) 42TextBinParam::TextBinParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
44 46
45 TextBinParam & 47 TextBinParam &
46TextBinParam::operator = (TextBinParam & x) 48TextBinParam::operator = (TextBinParam & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Param::operator = (x); 52 Param::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 TextBinParam & 56 TextBinParam &
55TextBinParam::operator = (const QCString & s) 57TextBinParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62TextBinParam::operator == (TextBinParam & x) 64TextBinParam::operator == (TextBinParam & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 return false; 67 return false;
66} 68}
67 69
diff --git a/kabc/vcard/TextBinValue.cpp b/kabc/vcard/TextBinValue.cpp
index c584009..a3a96ae 100644
--- a/kabc/vcard/TextBinValue.cpp
+++ b/kabc/vcard/TextBinValue.cpp
@@ -16,60 +16,62 @@
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <kmdcodec.h> 24#include <kmdcodec.h>
25 25
26#include <VCardTextBinValue.h> 26#include <VCardTextBinValue.h>
27#include <VCardValue.h> 27#include <VCardValue.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29using namespace VCARD; 31using namespace VCARD;
30 32
31TextBinValue::TextBinValue() 33TextBinValue::TextBinValue()
32 :Value() 34 :Value()
33{ 35{
34} 36}
35 37
36TextBinValue::TextBinValue(const TextBinValue & x) 38TextBinValue::TextBinValue(const TextBinValue & x)
37 :Value(x) 39 :Value(x)
38{ 40{
39 mIsBinary_ = x.mIsBinary_; 41 mIsBinary_ = x.mIsBinary_;
40 mData_ = x.mData_; 42 mData_ = x.mData_;
41 mUrl_ = x.mUrl_; 43 mUrl_ = x.mUrl_;
42} 44}
43 45
44TextBinValue::TextBinValue(const QCString & s) 46TextBinValue::TextBinValue(const Q3CString & s)
45 :Value(s) 47 :Value(s)
46{ 48{
47} 49}
48 50
49 TextBinValue & 51 TextBinValue &
50TextBinValue::operator = (TextBinValue & x) 52TextBinValue::operator = (TextBinValue & x)
51{ 53{
52 if (*this == x) return *this; 54 if (*this == x) return *this;
53 55
54 mIsBinary_ = x.mIsBinary_; 56 mIsBinary_ = x.mIsBinary_;
55 mData_ = x.mData_; 57 mData_ = x.mData_;
56 mUrl_ = x.mUrl_; 58 mUrl_ = x.mUrl_;
57 59
58 Value::operator = (x); 60 Value::operator = (x);
59 return *this; 61 return *this;
60} 62}
61 63
62 TextBinValue & 64 TextBinValue &
63TextBinValue::operator = (const QCString & s) 65TextBinValue::operator = (const Q3CString & s)
64{ 66{
65 Value::operator = (s); 67 Value::operator = (s);
66 return *this; 68 return *this;
67} 69}
68 70
69 bool 71 bool
70TextBinValue::operator == (TextBinValue & x) 72TextBinValue::operator == (TextBinValue & x)
71{ 73{
72 x.parse(); 74 x.parse();
73 75
74 if ( mIsBinary_ != x.mIsBinary_ ) return false; 76 if ( mIsBinary_ != x.mIsBinary_ ) return false;
75 if ( mData_ != x.mData_ ) return false; 77 if ( mData_ != x.mData_ ) return false;
diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp
index c4ac1e3..919f4f7 100644
--- a/kabc/vcard/TextListValue.cpp
+++ b/kabc/vcard/TextListValue.cpp
@@ -17,53 +17,55 @@
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardRToken.h> 24#include <VCardRToken.h>
25 25
26#include <VCardTextListValue.h> 26#include <VCardTextListValue.h>
27 27
28#include <VCardValue.h> 28#include <VCardValue.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
32TextListValue::TextListValue() 34TextListValue::TextListValue()
33 :Value() 35 :Value()
34{ 36{
35} 37}
36 38
37TextListValue::TextListValue(const TextListValue & x) 39TextListValue::TextListValue(const TextListValue & x)
38 :Value(x) 40 :Value(x)
39{ 41{
40} 42}
41 43
42TextListValue::TextListValue(const QCString & s) 44TextListValue::TextListValue(const Q3CString & s)
43 :Value(s) 45 :Value(s)
44{ 46{
45} 47}
46 48
47 TextListValue & 49 TextListValue &
48TextListValue::operator = (TextListValue & x) 50TextListValue::operator = (TextListValue & x)
49{ 51{
50 if (*this == x) return *this; 52 if (*this == x) return *this;
51 53
52 Value::operator = (x); 54 Value::operator = (x);
53 return *this; 55 return *this;
54} 56}
55 57
56 TextListValue & 58 TextListValue &
57TextListValue::operator = (const QCString & s) 59TextListValue::operator = (const Q3CString & s)
58{ 60{
59 Value::operator = (s); 61 Value::operator = (s);
60 return *this; 62 return *this;
61} 63}
62 64
63 bool 65 bool
64TextListValue::operator == (TextListValue & x) 66TextListValue::operator == (TextListValue & x)
65{ 67{
66 x.parse(); 68 x.parse();
67 return false; 69 return false;
68} 70}
69 71
@@ -73,35 +75,35 @@ TextListValue::~TextListValue()
73 75
74 void 76 void
75TextListValue::_parse() 77TextListValue::_parse()
76{ 78{
77 RTokenise(strRep_, ";", valueList_); 79 RTokenise(strRep_, ";", valueList_);
78} 80}
79 81
80 void 82 void
81TextListValue::_assemble() 83TextListValue::_assemble()
82{ 84{
83 bool first(true); 85 bool first(true);
84 86
85 QStrListIterator it(valueList_); 87 Q3StrListIterator it(valueList_);
86 88
87 for (; it.current(); ++it) { 89 for (; it.current(); ++it) {
88 if (!first) strRep_ += ';'; 90 if (!first) strRep_ += ';';
89 strRep_ += it.current(); 91 strRep_ += it.current();
90 first = false; 92 first = false;
91 } 93 }
92} 94}
93 95
94 unsigned int 96 unsigned int
95TextListValue::numValues() 97TextListValue::numValues()
96{ 98{
97 parse(); 99 parse();
98 return valueList_.count(); 100 return valueList_.count();
99} 101}
100 102
101 QCString 103 Q3CString
102TextListValue::value(unsigned int i) 104TextListValue::value(unsigned int i)
103{ 105{
104 parse(); 106 parse();
105 return valueList_.at(i); 107 return valueList_.at(i);
106} 108}
107 109
diff --git a/kabc/vcard/TextParam.cpp b/kabc/vcard/TextParam.cpp
index 7c68700..ce6661f 100644
--- a/kabc/vcard/TextParam.cpp
+++ b/kabc/vcard/TextParam.cpp
@@ -15,53 +15,55 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardTextParam.h> 24#include <VCardTextParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30TextParam::TextParam() 32TextParam::TextParam()
31 :Param() 33 :Param()
32{ 34{
33} 35}
34 36
35TextParam::TextParam(const TextParam & x) 37TextParam::TextParam(const TextParam & x)
36 :Param(x) 38 :Param(x)
37{ 39{
38} 40}
39 41
40TextParam::TextParam(const QCString & s) 42TextParam::TextParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
44 46
45 TextParam & 47 TextParam &
46TextParam::operator = (TextParam & x) 48TextParam::operator = (TextParam & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Param::operator = (x); 52 Param::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 TextParam & 56 TextParam &
55TextParam::operator = (const QCString & s) 57TextParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62TextParam::operator == (TextParam & x) 64TextParam::operator == (TextParam & x)
63{ 65{
64 x.parse(); 66 x.parse();
65 67
66 return false; 68 return false;
67} 69}
diff --git a/kabc/vcard/TextValue.cpp b/kabc/vcard/TextValue.cpp
index 09934fa..d0d2996 100644
--- a/kabc/vcard/TextValue.cpp
+++ b/kabc/vcard/TextValue.cpp
@@ -15,62 +15,64 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardTextValue.h> 24#include <VCardTextValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30TextValue::TextValue() 32TextValue::TextValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35TextValue::TextValue(const TextValue & x) 37TextValue::TextValue(const TextValue & x)
36 :Value(x) 38 :Value(x)
37{ 39{
38} 40}
39 41
40TextValue::TextValue(const QCString & s) 42TextValue::TextValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
44 46
45 TextValue & 47 TextValue &
46TextValue::operator = (TextValue & x) 48TextValue::operator = (TextValue & x)
47{ 49{
48 if (*this == x) return *this; 50 if (*this == x) return *this;
49 51
50 Value::operator = (x); 52 Value::operator = (x);
51 return *this; 53 return *this;
52} 54}
53 55
54 TextValue & 56 TextValue &
55TextValue::operator = (const QCString & s) 57TextValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
59} 61}
60 62
61 bool 63 bool
62TextValue::operator == (TextValue & x) 64TextValue::operator == (TextValue & x)
63{ 65{
64 return strRep_ = x.strRep_; 66 return strRep_ == x.strRep_;
65} 67}
66 68
67TextValue::~TextValue() 69TextValue::~TextValue()
68{ 70{
69} 71}
70 72
71 TextValue * 73 TextValue *
72TextValue::clone() 74TextValue::clone()
73{ 75{
74 return new TextValue( *this ); 76 return new TextValue( *this );
75} 77}
76 78
diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp
index c1d1022..26da7f4 100644
--- a/kabc/vcard/URIValue.cpp
+++ b/kabc/vcard/URIValue.cpp
@@ -15,66 +15,68 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardURIValue.h> 24#include <VCardURIValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30URIValue::URIValue() 32URIValue::URIValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35URIValue::URIValue(const QCString & scheme, const QCString & schemeSpecificPart) 37URIValue::URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart)
36 :Value(), 38 :Value(),
37 scheme_ (scheme), 39 scheme_ (scheme),
38 schemeSpecificPart_(schemeSpecificPart) 40 schemeSpecificPart_(schemeSpecificPart)
39{ 41{
40 parsed_ = true; 42 parsed_ = true;
41} 43}
42 44
43URIValue::URIValue(const URIValue & x) 45URIValue::URIValue(const URIValue & x)
44 : Value (x), 46 : Value (x),
45 scheme_ (x.scheme_), 47 scheme_ (x.scheme_),
46 schemeSpecificPart_(x.schemeSpecificPart_) 48 schemeSpecificPart_(x.schemeSpecificPart_)
47{ 49{
48} 50}
49 51
50URIValue::URIValue(const QCString & s) 52URIValue::URIValue(const Q3CString & s)
51 :Value(s) 53 :Value(s)
52{ 54{
53} 55}
54 56
55 URIValue & 57 URIValue &
56URIValue::operator = (URIValue & x) 58URIValue::operator = (URIValue & x)
57{ 59{
58 if (*this == x) return *this; 60 if (*this == x) return *this;
59 61
60 scheme_ = x.scheme_; 62 scheme_ = x.scheme_;
61 schemeSpecificPart_= x.schemeSpecificPart_; 63 schemeSpecificPart_= x.schemeSpecificPart_;
62 64
63 Value::operator = (x); 65 Value::operator = (x);
64 return *this; 66 return *this;
65} 67}
66 68
67 URIValue & 69 URIValue &
68URIValue::operator = (const QCString & s) 70URIValue::operator = (const Q3CString & s)
69{ 71{
70 Value::operator = (s); 72 Value::operator = (s);
71 return *this; 73 return *this;
72} 74}
73 75
74 bool 76 bool
75URIValue::operator == (URIValue & x) 77URIValue::operator == (URIValue & x)
76{ 78{
77 x.parse(); 79 x.parse();
78 return ( 80 return (
79 (scheme_ == x.scheme_) && 81 (scheme_ == x.scheme_) &&
80 (schemeSpecificPart_== x.schemeSpecificPart_)); 82 (schemeSpecificPart_== x.schemeSpecificPart_));
@@ -94,40 +96,40 @@ URIValue::_parse()
94 return; 96 return;
95 97
96 scheme_ = strRep_.left(split); 98 scheme_ = strRep_.left(split);
97 schemeSpecificPart_ = strRep_.mid(split + 1); 99 schemeSpecificPart_ = strRep_.mid(split + 1);
98} 100}
99 101
100 void 102 void
101URIValue::_assemble() 103URIValue::_assemble()
102{ 104{
103 strRep_ = scheme_ + ':' + schemeSpecificPart_; 105 strRep_ = scheme_ + ':' + schemeSpecificPart_;
104} 106}
105 107
106 QCString 108 Q3CString
107URIValue::scheme() 109URIValue::scheme()
108{ 110{
109 parse(); 111 parse();
110 return scheme_; 112 return scheme_;
111} 113}
112 114
113 QCString 115 Q3CString
114URIValue::schemeSpecificPart() 116URIValue::schemeSpecificPart()
115{ 117{
116 parse(); 118 parse();
117 return schemeSpecificPart_; 119 return schemeSpecificPart_;
118} 120}
119 121
120 void 122 void
121URIValue::setScheme(const QCString & s) 123URIValue::setScheme(const Q3CString & s)
122{ 124{
123 parse(); 125 parse();
124 scheme_ = s; 126 scheme_ = s;
125} 127}
126 128
127 void 129 void
128URIValue::setSchemeSpecificPart(const QCString & s) 130URIValue::setSchemeSpecificPart(const Q3CString & s)
129{ 131{
130 parse(); 132 parse();
131 schemeSpecificPart_ = s; 133 schemeSpecificPart_ = s;
132} 134}
133 135
diff --git a/kabc/vcard/UTCValue.cpp b/kabc/vcard/UTCValue.cpp
index 374306c..f35d986 100644
--- a/kabc/vcard/UTCValue.cpp
+++ b/kabc/vcard/UTCValue.cpp
@@ -15,58 +15,60 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardUTCValue.h> 24#include <VCardUTCValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
30UTCValue::UTCValue() 32UTCValue::UTCValue()
31 :Value() 33 :Value()
32{ 34{
33} 35}
34 36
35UTCValue::UTCValue(const UTCValue & x) 37UTCValue::UTCValue(const UTCValue & x)
36 : Value(x),positive_(x.positive_), hour_(x.hour_), minute_(x.minute_) 38 : Value(x),positive_(x.positive_), hour_(x.hour_), minute_(x.minute_)
37 39
38{ 40{
39} 41}
40 42
41UTCValue::UTCValue(const QCString & s) 43UTCValue::UTCValue(const Q3CString & s)
42 :Value(s) 44 :Value(s)
43{ 45{
44} 46}
45 47
46 UTCValue & 48 UTCValue &
47UTCValue::operator = (UTCValue & x) 49UTCValue::operator = (UTCValue & x)
48{ 50{
49 if (*this == x) return *this; 51 if (*this == x) return *this;
50 52
51 positive_ = x.positive_; 53 positive_ = x.positive_;
52 hour_ = x.hour_; 54 hour_ = x.hour_;
53 minute_ = x.minute_; 55 minute_ = x.minute_;
54 56
55 Value::operator = (x); 57 Value::operator = (x);
56 return *this; 58 return *this;
57} 59}
58 60
59 UTCValue & 61 UTCValue &
60UTCValue::operator = (const QCString & s) 62UTCValue::operator = (const Q3CString & s)
61{ 63{
62 Value::operator = (s); 64 Value::operator = (s);
63 return *this; 65 return *this;
64} 66}
65 67
66 bool 68 bool
67UTCValue::operator == (UTCValue & x) 69UTCValue::operator == (UTCValue & x)
68{ 70{
69 x.parse(); 71 x.parse();
70 72
71 if (positive_ != x.positive_) return false; 73 if (positive_ != x.positive_) return false;
72 if (hour_ != x.hour_) return false; 74 if (hour_ != x.hour_) return false;
diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp
index a2ff327..bae5385 100644
--- a/kabc/vcard/VCardEntity.cpp
+++ b/kabc/vcard/VCardEntity.cpp
@@ -14,59 +14,61 @@
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qregexp.h> 24#include <qregexp.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27#include <VCardDefines.h> 29#include <VCardDefines.h>
28#include <VCardVCardEntity.h> 30#include <VCardVCardEntity.h>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
32VCardEntity::VCardEntity() 34VCardEntity::VCardEntity()
33 :Entity() 35 :Entity()
34{ 36{
35 cardList_.setAutoDelete( TRUE ); 37 cardList_.setAutoDelete( TRUE );
36} 38}
37 39
38VCardEntity::VCardEntity(const VCardEntity & x) 40VCardEntity::VCardEntity(const VCardEntity & x)
39 :Entity(x) 41 :Entity(x)
40{ 42{
41 cardList_.setAutoDelete( TRUE ); 43 cardList_.setAutoDelete( TRUE );
42} 44}
43 45
44VCardEntity::VCardEntity(const QCString & s) 46VCardEntity::VCardEntity(const Q3CString & s)
45 :Entity(s) 47 :Entity(s)
46{ 48{
47 cardList_.setAutoDelete( TRUE ); 49 cardList_.setAutoDelete( TRUE );
48} 50}
49 51
50 VCardEntity & 52 VCardEntity &
51VCardEntity::operator = (VCardEntity & x) 53VCardEntity::operator = (VCardEntity & x)
52{ 54{
53 if (*this == x) return *this; 55 if (*this == x) return *this;
54 56
55 Entity::operator = (x); 57 Entity::operator = (x);
56 return *this; 58 return *this;
57} 59}
58 60
59 VCardEntity & 61 VCardEntity &
60VCardEntity::operator = (const QCString & s) 62VCardEntity::operator = (const Q3CString & s)
61{ 63{
62 Entity::operator = (s); 64 Entity::operator = (s);
63 return *this; 65 return *this;
64} 66}
65 67
66 bool 68 bool
67VCardEntity::operator == (VCardEntity & x) 69VCardEntity::operator == (VCardEntity & x)
68{ 70{
69 x.parse(); 71 x.parse();
70 return false; 72 return false;
71} 73}
72 74
@@ -74,33 +76,33 @@ VCardEntity::~VCardEntity()
74{ 76{
75} 77}
76 78
77 void 79 void
78VCardEntity::_parse() 80VCardEntity::_parse()
79{ 81{
80#if 0 82#if 0
81 QTime tim; 83 QTime tim;
82 tim.start(); 84 tim.start();
83 int num = 0; 85 int num = 0;
84 // old code 86 // old code
85 vDebug("parse"); 87 vDebug("parse");
86 QCString s(strRep_); 88 Q3CString s(strRep_);
87 89
88 int i = s.find(QRegExp("BEGIN:VCARD", false)); 90 int i = s.find(QRegExp("BEGIN:VCARD", false));
89 91
90 while (i != -1) { 92 while (i != -1) {
91 93
92 i = s.find(QRegExp("BEGIN:VCARD", false), 11); 94 i = s.find(QRegExp("BEGIN:VCARD", false), 11);
93 95
94 QCString cardStr(s.left(i)); 96 Q3CString cardStr(s.left(i));
95 97
96 VCard * v = new VCard(cardStr); 98 VCard * v = new VCard(cardStr);
97 99
98 cardList_.append(v); 100 cardList_.append(v);
99 101
100 v->parse(); 102 v->parse();
101 103
102 s.remove(0, i); 104 s.remove(0, i);
103 } 105 }
104 106
105#else 107#else
106 // this code is up to 17 (!) times faster 108 // this code is up to 17 (!) times faster
@@ -123,25 +125,25 @@ VCardEntity::_parse()
123 if ( i+add < len && strRep_.at(i+add++) == 'C') 125 if ( i+add < len && strRep_.at(i+add++) == 'C')
124 if ( i+add < len && strRep_.at(i+add++) == 'A') 126 if ( i+add < len && strRep_.at(i+add++) == 'A')
125 if ( i+add < len && strRep_.at(i+add++) == 'R') 127 if ( i+add < len && strRep_.at(i+add++) == 'R')
126 if ( i+add < len && strRep_.at(i+add++) == 'D') 128 if ( i+add < len && strRep_.at(i+add++) == 'D')
127 if ( i+add < len && (strRep_.at(i+add) == '\r' || strRep_.at(i+add) == '\n' )) 129 if ( i+add < len && (strRep_.at(i+add) == '\r' || strRep_.at(i+add) == '\n' ))
128 break; 130 break;
129 } 131 }
130 ++i; 132 ++i;
131 } 133 }
132 if ( i <= len ) { 134 if ( i <= len ) {
133 ++num; 135 ++num;
134 char* dat = strRep_.data()+start; 136 char* dat = strRep_.data()+start;
135 VCard * v = new VCard( QCString ( dat,i-start ) ); 137 VCard * v = new VCard( Q3CString ( dat,i-start ) );
136 start = i; 138 start = i;
137 cardList_.append(v); 139 cardList_.append(v);
138 v->parse(); 140 v->parse();
139 } 141 }
140 i+= 11; 142 i+= 11;
141 } 143 }
142#endif 144#endif
143 //qDebug("***time %d found %d", tim.elapsed(), num); 145 //qDebug("***time %d found %d", tim.elapsed(), num);
144} 146}
145 147
146 void 148 void
147VCardEntity::_assemble() 149VCardEntity::_assemble()
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp
index bad2ef1..5dd675d 100644
--- a/kabc/vcard/VCardv.cpp
+++ b/kabc/vcard/VCardv.cpp
@@ -12,113 +12,114 @@
12 12
13 The above copyright notice and this permission notice shall be included in 13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25#include <qstrlist.h> 25#include <q3strlist.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27#include <qstring.h> 27#include <qstring.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29 29
30#include <VCardEntity.h> 30#include <VCardEntity.h>
31#include <VCardVCard.h> 31#include <VCardVCard.h>
32#include <VCardContentLine.h> 32#include <VCardContentLine.h>
33#include <VCardRToken.h> 33#include <VCardRToken.h>
34 34
35#include <VCardDefines.h> 35#include <VCardDefines.h>
36 36
37using namespace VCARD; 37using namespace VCARD;
38 38
39VCard::VCard() 39VCard::VCard()
40 :Entity() 40 :Entity()
41{ 41{
42 contentLineList_.setAutoDelete( TRUE ); 42 contentLineList_.setAutoDelete( TRUE );
43} 43}
44 44
45VCard::VCard(const VCard & x) 45VCard::VCard(const VCard & x)
46 :Entity(x), 46 :Entity(x),
47 group_(x.group_) 47 group_(x.group_)
48{ 48{
49 contentLineList_.setAutoDelete( TRUE ); 49 contentLineList_.setAutoDelete( TRUE );
50 50
51 QPtrListIterator<ContentLine> it(x.contentLineList_); 51 Q3PtrListIterator<ContentLine> it(x.contentLineList_);
52 for (; it.current(); ++it) { 52 for (; it.current(); ++it) {
53 ContentLine * c = new ContentLine(*it.current()); 53 ContentLine * c = new ContentLine(*it.current());
54 contentLineList_.append(c); 54 contentLineList_.append(c);
55 } 55 }
56 56
57} 57}
58 58
59VCard::VCard(const QCString & s) 59VCard::VCard(const Q3CString & s)
60 :Entity(s) 60 :Entity(s)
61{ 61{
62 contentLineList_.setAutoDelete( TRUE ); 62 contentLineList_.setAutoDelete( TRUE );
63} 63}
64 64
65 VCard & 65 VCard &
66VCard::operator = (VCard & x) 66VCard::operator = (VCard & x)
67{ 67{
68 if (*this == x) return *this; 68 if (*this == x) return *this;
69 69
70 group_ = x.group(); 70 group_ = x.group();
71 QPtrListIterator<ContentLine> it(x.contentLineList_); 71 Q3PtrListIterator<ContentLine> it(x.contentLineList_);
72 for (; it.current(); ++it) { 72 for (; it.current(); ++it) {
73 ContentLine * c = new ContentLine(*it.current()); 73 ContentLine * c = new ContentLine(*it.current());
74 contentLineList_.append(c); 74 contentLineList_.append(c);
75 } 75 }
76 76
77 Entity::operator = (x); 77 Entity::operator = (x);
78 return *this; 78 return *this;
79} 79}
80 80
81 VCard & 81 VCard &
82VCard::operator = (const QCString & s) 82VCard::operator = (const Q3CString & s)
83{ 83{
84 Entity::operator = (s); 84 Entity::operator = (s);
85 return *this; 85 return *this;
86} 86}
87 87
88 bool 88 bool
89VCard::operator == (VCard & x) 89VCard::operator == (VCard & x)
90{ 90{
91 x.parse(); 91 x.parse();
92 return false; 92 return false;
93} 93}
94 94
95VCard::~VCard() 95VCard::~VCard()
96{ 96{
97} 97}
98 98
99 void 99 void
100VCard::_parse() 100VCard::_parse()
101{ 101{
102 102
103 QStringList l; 103 QStringList l;
104 QStrList sl; 104 Q3StrList sl;
105 105
106 RTokenise(strRep_, "\r\n", sl); 106 RTokenise(strRep_, "\r\n", sl);
107 107
108 if (sl.count() < 3) { // Invalid VCARD ! 108 if (sl.count() < 3) { // Invalid VCARD !
109 //qDebug("invalid vcard "); 109 //qDebug("invalid vcard ");
110 return; 110 return;
111 } 111 }
112 l = QStringList::fromStrList( sl ); 112 for(Q3StrList::iterator i=sl.begin();i!=sl.end();++i)
113 l.push_back(*i);
113 // Get the first line 114 // Get the first line
114 QString beginLine = l[0].stripWhiteSpace(); 115 QString beginLine = l[0].stripWhiteSpace();
115 116
116 // Remove extra blank lines 117 // Remove extra blank lines
117 while (l.last().isEmpty()) 118 while (l.last().isEmpty())
118 l.remove(l.last()); 119 l.remove(l.last());
119 120
120 // Now we know this is the last line 121 // Now we know this is the last line
121 QString endLine = l.last(); 122 QString endLine = l.last();
122 123
123 // Trash the first and last lines as we have seen them. 124 // Trash the first and last lines as we have seen them.
124 l.remove(l.begin()); 125 l.remove(l.begin());
@@ -171,25 +172,25 @@ VCard::_parse()
171 for (; it != l.end(); ++it) { 172 for (; it != l.end(); ++it) {
172 cur = (*it); 173 cur = (*it);
173 ++it; 174 ++it;
174 while ( it!= l.end() && (*it).at(0) == ' '&& (*it).length()!= 1) { 175 while ( it!= l.end() && (*it).at(0) == ' '&& (*it).length()!= 1) {
175 cur += (*it).mid(1) ; 176 cur += (*it).mid(1) ;
176 ++it; 177 ++it;
177 } 178 }
178 --it; 179 --it;
179 refolded.append(cur); 180 refolded.append(cur);
180 } 181 }
181 QStringList::Iterator it2 = refolded.begin(); 182 QStringList::Iterator it2 = refolded.begin();
182 for (; it2 != refolded.end(); ++it2) { 183 for (; it2 != refolded.end(); ++it2) {
183 ContentLine * cl = new ContentLine(QCString((*it2).latin1())); 184 ContentLine * cl = new ContentLine(Q3CString((*it2).latin1()));
184 cl->parse(); 185 cl->parse();
185 if (cl->value() == 0) 186 if (cl->value() == 0)
186 { 187 {
187 qDebug("Content line could not be parsed. Discarded: %s", (*it2).latin1()); 188 qDebug("Content line could not be parsed. Discarded: %s", (*it2).latin1());
188 delete cl; 189 delete cl;
189 } 190 }
190 else 191 else
191 contentLineList_.append(cl); 192 contentLineList_.append(cl);
192 } 193 }
193 194
194 /////////////////////////////////////////////////////////////// 195 ///////////////////////////////////////////////////////////////
195 // LAST LINE 196 // LAST LINE
@@ -219,76 +220,76 @@ VCard::_parse()
219 if (qstricmp(valuePart, "VCARD") != 0) // Not a vcard ! 220 if (qstricmp(valuePart, "VCARD") != 0) // Not a vcard !
220 return; 221 return;
221#endif 222#endif
222} 223}
223 224
224 void 225 void
225VCard::_assemble() 226VCard::_assemble()
226{ 227{
227 vDebug("Assembling vcard"); 228 vDebug("Assembling vcard");
228 strRep_ = "BEGIN:VCARD\r\n"; 229 strRep_ = "BEGIN:VCARD\r\n";
229 strRep_ += "VERSION:3.0\r\n"; 230 strRep_ += "VERSION:3.0\r\n";
230 231
231 QPtrListIterator<ContentLine> it(contentLineList_); 232 Q3PtrListIterator<ContentLine> it(contentLineList_);
232 233
233 for (; it.current(); ++it) 234 for (; it.current(); ++it)
234 strRep_ += it.current()->asString() + "\r\n"; 235 strRep_ += it.current()->asString() + "\r\n";
235 236
236 strRep_ += "END:VCARD\r\n"; 237 strRep_ += "END:VCARD\r\n";
237} 238}
238 239
239 bool 240 bool
240VCard::has(EntityType t) 241VCard::has(EntityType t)
241{ 242{
242 parse(); 243 parse();
243 return contentLine(t) == 0 ? false : true; 244 return contentLine(t) == 0 ? false : true;
244} 245}
245 246
246 bool 247 bool
247VCard::has(const QCString & s) 248VCard::has(const Q3CString & s)
248{ 249{
249 parse(); 250 parse();
250 return contentLine(s) == 0 ? false : true; 251 return contentLine(s) == 0 ? false : true;
251} 252}
252 253
253 void 254 void
254VCard::add(const ContentLine & cl) 255VCard::add(const ContentLine & cl)
255{ 256{
256 parse(); 257 parse();
257 ContentLine * c = new ContentLine(cl); 258 ContentLine * c = new ContentLine(cl);
258 contentLineList_.append(c); 259 contentLineList_.append(c);
259} 260}
260 261
261 void 262 void
262VCard::add(const QCString & s) 263VCard::add(const Q3CString & s)
263{ 264{
264 parse(); 265 parse();
265 ContentLine * c = new ContentLine(s); 266 ContentLine * c = new ContentLine(s);
266 contentLineList_.append(c); 267 contentLineList_.append(c);
267} 268}
268 269
269 ContentLine * 270 ContentLine *
270VCard::contentLine(EntityType t) 271VCard::contentLine(EntityType t)
271{ 272{
272 parse(); 273 parse();
273 QPtrListIterator<ContentLine> it(contentLineList_); 274 Q3PtrListIterator<ContentLine> it(contentLineList_);
274 275
275 for (; it.current(); ++it) 276 for (; it.current(); ++it)
276 if (it.current()->entityType() == t) 277 if (it.current()->entityType() == t)
277 return it.current(); 278 return it.current();
278 279
279 return 0; 280 return 0;
280} 281}
281 282
282 ContentLine * 283 ContentLine *
283VCard::contentLine(const QCString & s) 284VCard::contentLine(const Q3CString & s)
284{ 285{
285 parse(); 286 parse();
286 QPtrListIterator<ContentLine> it(contentLineList_); 287 Q3PtrListIterator<ContentLine> it(contentLineList_);
287 288
288 for (; it.current(); ++it) 289 for (; it.current(); ++it)
289 if (it.current()->entityType() == EntityNameToEntityType(s)) 290 if (it.current()->entityType() == EntityNameToEntityType(s))
290 return it.current(); 291 return it.current();
291 292
292 return 0; 293 return 0;
293} 294}
294 295
diff --git a/kabc/vcard/Value.cpp b/kabc/vcard/Value.cpp
index 1978af2..3a4d406 100644
--- a/kabc/vcard/Value.cpp
+++ b/kabc/vcard/Value.cpp
@@ -14,53 +14,55 @@
14 all copies or substantial portions of the Software. 14 all copies or substantial portions of the Software.
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <VCardEntity.h> 24#include <VCardEntity.h>
25#include <VCardValue.h> 25#include <VCardValue.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27using namespace VCARD; 29using namespace VCARD;
28 30
29Value::Value() 31Value::Value()
30 :Entity() 32 :Entity()
31{ 33{
32} 34}
33 35
34Value::Value(const Value & x) 36Value::Value(const Value & x)
35 :Entity(x) 37 :Entity(x)
36{ 38{
37} 39}
38 40
39Value::Value(const QCString & s) 41Value::Value(const Q3CString & s)
40 :Entity(s) 42 :Entity(s)
41{ 43{
42} 44}
43 45
44 Value & 46 Value &
45Value::operator = (Value & x) 47Value::operator = (Value & x)
46{ 48{
47 if (*this == x) return *this; 49 if (*this == x) return *this;
48 50
49 Entity::operator = (x); 51 Entity::operator = (x);
50 return *this; 52 return *this;
51} 53}
52 54
53 Value & 55 Value &
54Value::operator = (const QCString & s) 56Value::operator = (const Q3CString & s)
55{ 57{
56 Entity::operator = (s); 58 Entity::operator = (s);
57 return *this; 59 return *this;
58} 60}
59 61
60 bool 62 bool
61Value::operator == (Value & x) 63Value::operator == (Value & x)
62{ 64{
63 x.parse(); 65 x.parse();
64 return false; 66 return false;
65} 67}
66 68
diff --git a/kabc/vcard/include/VCardAdrParam.h b/kabc/vcard/include/VCardAdrParam.h
index 89dcb64..6456624 100644
--- a/kabc/vcard/include/VCardAdrParam.h
+++ b/kabc/vcard/include/VCardAdrParam.h
@@ -15,50 +15,50 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef ADRPARAM_H 24#ifndef ADRPARAM_H
25#define ADRPARAM_H 25#define ADRPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30#include <VCardParam.h> 30#include <VCardParam.h>
31 31
32namespace VCARD 32namespace VCARD
33{ 33{
34 34
35class AdrParam : public Param 35class AdrParam : public Param
36{ 36{
37 37
38#include "AdrParam-generated.h" 38#include "AdrParam-generated.h"
39 39
40 QStrList adrTypeList() 40 Q3StrList adrTypeList()
41 { parse(); return adrTypeList_; } 41 { parse(); return adrTypeList_; }
42 42
43 QCString textParam() 43 Q3CString textParam()
44 { parse(); return textParam_; } 44 { parse(); return textParam_; }
45 45
46 void setAdrTypeList(const QStrList & l) 46 void setAdrTypeList(const Q3StrList & l)
47 { adrTypeList_ = l; assembled_ = false; } 47 { adrTypeList_ = l; assembled_ = false; }
48 48
49 void setTextParam(const QCString & s) 49 void setTextParam(const Q3CString & s)
50 { textParam_ = s; assembled_ = false; } 50 { textParam_ = s; assembled_ = false; }
51 51
52 enum AdrType { 52 enum AdrType {
53 AdrDom, AdrIntl, AdrPostal, AdrParcel, AdrHome, AdrWork, AdrPref, 53 AdrDom, AdrIntl, AdrPostal, AdrParcel, AdrHome, AdrWork, AdrPref,
54 AdrIANA, AdrX 54 AdrIANA, AdrX
55 }; 55 };
56 56
57 private: 57 private:
58 58
59 QStrListadrTypeList_; 59 Q3StrListadrTypeList_;
60 QCStringtextParam_; 60 Q3CStringtextParam_;
61}; 61};
62} 62}
63 63
64#endif 64#endif
diff --git a/kabc/vcard/include/VCardAdrValue.h b/kabc/vcard/include/VCardAdrValue.h
index 0731924..14ddb02 100644
--- a/kabc/vcard/include/VCardAdrValue.h
+++ b/kabc/vcard/include/VCardAdrValue.h
@@ -15,69 +15,71 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef ADRVALUE_H 24#ifndef ADRVALUE_H
25#define ADRVALUE_H 25#define ADRVALUE_H
26 26
27#include <qstrlist.h> 27#include <q3strlist.h>
28//Added by qt3to4:
29#include <Q3CString>
28#include <VCardValue.h> 30#include <VCardValue.h>
29 31
30namespace VCARD 32namespace VCARD
31{ 33{
32 34
33class AdrValue : public Value 35class AdrValue : public Value
34{ 36{
35 37
36#include "AdrValue-generated.h" 38#include "AdrValue-generated.h"
37 39
38 AdrValue *clone(); 40 AdrValue *clone();
39 41
40 void setPOBox(const QCString & s) 42 void setPOBox(const Q3CString & s)
41 { poBox_ = s; assembled_ = false; } 43 { poBox_ = s; assembled_ = false; }
42 44
43 void setExtAddress(const QCString & s) 45 void setExtAddress(const Q3CString & s)
44 { extAddress_ = s; assembled_ = false; } 46 { extAddress_ = s; assembled_ = false; }
45 47
46 void setStreet(const QCString & s) 48 void setStreet(const Q3CString & s)
47 { street_ = s; assembled_ = false; } 49 { street_ = s; assembled_ = false; }
48 50
49 void setLocality(const QCString & s) 51 void setLocality(const Q3CString & s)
50 { locality_ = s; assembled_ = false; } 52 { locality_ = s; assembled_ = false; }
51 53
52 void setRegion(const QCString & s) 54 void setRegion(const Q3CString & s)
53 { region_ = s; assembled_ = false; } 55 { region_ = s; assembled_ = false; }
54 56
55 void setPostCode(const QCString & s) 57 void setPostCode(const Q3CString & s)
56 { postCode_ = s; assembled_ = false; } 58 { postCode_ = s; assembled_ = false; }
57 59
58 void setCountryName(const QCString & s) 60 void setCountryName(const Q3CString & s)
59 { countryName_ = s; assembled_ = false; } 61 { countryName_ = s; assembled_ = false; }
60 62
61 QCString poBox() { parse(); return poBox_;} 63 Q3CString poBox() { parse(); return poBox_;}
62 QCString extAddress() { parse(); return extAddress_;} 64 Q3CString extAddress() { parse(); return extAddress_;}
63 QCString street() { parse(); return street_;} 65 Q3CString street() { parse(); return street_;}
64 QCString locality() { parse(); return locality_;} 66 Q3CString locality() { parse(); return locality_;}
65 QCString region() { parse(); return region_;} 67 Q3CString region() { parse(); return region_;}
66 QCString postCode() { parse(); return postCode_;} 68 Q3CString postCode() { parse(); return postCode_;}
67 QCString countryName() { parse(); return countryName_;} 69 Q3CString countryName() { parse(); return countryName_;}
68 70
69 private: 71 private:
70 72
71 QCString poBox_; 73 Q3CString poBox_;
72 QCString extAddress_; 74 Q3CString extAddress_;
73 QCString street_; 75 Q3CString street_;
74 QCString locality_; 76 Q3CString locality_;
75 QCString region_; 77 Q3CString region_;
76 QCString postCode_; 78 Q3CString postCode_;
77 QCString countryName_; 79 Q3CString countryName_;
78}; 80};
79 81
80} 82}
81 83
82#endif 84#endif
83 85
diff --git a/kabc/vcard/include/VCardAgentParam.h b/kabc/vcard/include/VCardAgentParam.h
index 72a05db..5733540 100644
--- a/kabc/vcard/include/VCardAgentParam.h
+++ b/kabc/vcard/include/VCardAgentParam.h
@@ -15,46 +15,46 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef AGENTPARAM_H 24#ifndef AGENTPARAM_H
25#define AGENTPARAM_H 25#define AGENTPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30#include <VCardURIValue.h> 30#include <VCardURIValue.h>
31 31
32namespace VCARD 32namespace VCARD
33{ 33{
34 34
35class AgentParam : public Param 35class AgentParam : public Param
36{ 36{
37 37
38#include "AgentParam-generated.h" 38#include "AgentParam-generated.h"
39 39
40 bool refer() 40 bool refer()
41 { parse(); return refer_; } 41 { parse(); return refer_; }
42 42
43 URIValue uri() 43 URIValue uri()
44 { parse(); return uri_; } 44 { parse(); return uri_; }
45 45
46 void setRefer(bool b) 46 void setRefer(bool b)
47 { refer_ = b; assembled_ = false; } 47 { refer_ = b; assembled_ = false; }
48 48
49 void setURI(const QCString & s) 49 void setURI(const Q3CString & s)
50 { uri_ = s; assembled_ = false; } 50 { uri_ = s; assembled_ = false; }
51 51
52 private: 52 private:
53 53
54 bool refer_; 54 bool refer_;
55 URIValueuri_; 55 URIValueuri_;
56}; 56};
57 57
58} 58}
59 59
60#endif 60#endif
diff --git a/kabc/vcard/include/VCardAgentValue.h b/kabc/vcard/include/VCardAgentValue.h
index f655836..b0d883b 100644
--- a/kabc/vcard/include/VCardAgentValue.h
+++ b/kabc/vcard/include/VCardAgentValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef AGENTVALUE_H 24#ifndef AGENTVALUE_H
25#define AGENTVALUE_H 25#define AGENTVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class AgentValue : public Value 34class AgentValue : public Value
35{ 35{
36 36
37#include "AgentValue-generated.h" 37#include "AgentValue-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardClassValue.h b/kabc/vcard/include/VCardClassValue.h
index ff133c2..c450169 100644
--- a/kabc/vcard/include/VCardClassValue.h
+++ b/kabc/vcard/include/VCardClassValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef CLASSVALUE_H 24#ifndef CLASSVALUE_H
25#define CLASSVALUE_H 25#define CLASSVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31#include <kdebug.h> 31#include <kdebug.h>
32 32
33namespace VCARD 33namespace VCARD
34{ 34{
35 35
36class ClassValue : public Value 36class ClassValue : public Value
37{ 37{
38 38
39#include "ClassValue-generated.h" 39#include "ClassValue-generated.h"
diff --git a/kabc/vcard/include/VCardContentLine.h b/kabc/vcard/include/VCardContentLine.h
index 1c5f5be..c3c5253 100644
--- a/kabc/vcard/include/VCardContentLine.h
+++ b/kabc/vcard/include/VCardContentLine.h
@@ -15,63 +15,65 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef CONTENTLINE_H 24#ifndef CONTENTLINE_H
25#define CONTENTLINE_H 25#define CONTENTLINE_H
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29#include "VCardEnum.h" 31#include "VCardEnum.h"
30#include "VCardEntity.h" 32#include "VCardEntity.h"
31#include "VCardParam.h" 33#include "VCardParam.h"
32#include "VCardValue.h" 34#include "VCardValue.h"
33 35
34namespace VCARD 36namespace VCARD
35{ 37{
36 38
37class ContentLine : public Entity 39class ContentLine : public Entity
38{ 40{
39 41
40#include "ContentLine-generated.h" 42#include "ContentLine-generated.h"
41 43
42 QCString group() { parse(); return group_;} 44 Q3CString group() { parse(); return group_;}
43 QCString name() { parse(); return name_;} 45 Q3CString name() { parse(); return name_;}
44 Value * value() { parse(); return value_;} 46 Value * value() { parse(); return value_;}
45 ParamList paramList() { parse(); return paramList_;} 47 ParamList paramList() { parse(); return paramList_;}
46 ParamType paramType() { parse(); return paramType_;} 48 ParamType paramType() { parse(); return paramType_;}
47 ValueType valueType() { parse(); return valueType_;} 49 ValueType valueType() { parse(); return valueType_;}
48 EntityType entityType() { parse(); return entityType_;} 50 EntityType entityType() { parse(); return entityType_;}
49 51
50 void setGroup (const QCString & s) 52 void setGroup (const Q3CString & s)
51 { group_ = s; assembled_ = false; } 53 { group_ = s; assembled_ = false; }
52 54
53 void setName (const QCString & s) 55 void setName (const Q3CString & s)
54 { name_ = s; assembled_ = false; } 56 { name_ = s; assembled_ = false; }
55 57
56 void setValue (Value *s) 58 void setValue (Value *s)
57 { value_ = s; assembled_ = false; } 59 { value_ = s; assembled_ = false; }
58 60
59 void setParamList(const ParamList & l) 61 void setParamList(const ParamList & l)
60 { paramList_ = l; assembled_ = false; } 62 { paramList_ = l; assembled_ = false; }
61 63
62 void clear (); 64 void clear ();
63 65
64 private: 66 private:
65 67
66 QCString group_; 68 Q3CString group_;
67 QCString name_; 69 Q3CString name_;
68 QPtrList<Param> paramList_; 70 Q3PtrList<Param> paramList_;
69 Value * value_; 71 Value * value_;
70 72
71 ParamType paramType_; 73 ParamType paramType_;
72 ValueType valueType_; 74 ValueType valueType_;
73 EntityType entityType_; 75 EntityType entityType_;
74}; 76};
75} 77}
76 78
77#endif 79#endif
diff --git a/kabc/vcard/include/VCardDateParam.h b/kabc/vcard/include/VCardDateParam.h
index 21ac1f1..959b75b 100644
--- a/kabc/vcard/include/VCardDateParam.h
+++ b/kabc/vcard/include/VCardDateParam.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef DATEPARAM_H 24#ifndef DATEPARAM_H
25#define DATEPARAM_H 25#define DATEPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class DateParam : public Param 34class DateParam : public Param
35{ 35{
36 36
37#include "DateParam-generated.h" 37#include "DateParam-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardDateValue.h b/kabc/vcard/include/VCardDateValue.h
index c248966..fc216c0 100644
--- a/kabc/vcard/include/VCardDateValue.h
+++ b/kabc/vcard/include/VCardDateValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef DATEVALUE_H 24#ifndef DATEVALUE_H
25#define DATEVALUE_H 25#define DATEVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qdatetime.h> 28#include <qdatetime.h>
29 29
30#include <VCardValue.h> 30#include <VCardValue.h>
31 31
32namespace VCARD 32namespace VCARD
33{ 33{
34 34
35class DateValue : public Value 35class DateValue : public Value
36{ 36{
37#include "DateValue-generated.h" 37#include "DateValue-generated.h"
38 38
39 DateValue( 39 DateValue(
diff --git a/kabc/vcard/include/VCardDefines.h b/kabc/vcard/include/VCardDefines.h
index 557410f..5d4f2f4 100644
--- a/kabc/vcard/include/VCardDefines.h
+++ b/kabc/vcard/include/VCardDefines.h
@@ -26,28 +26,28 @@
26 26
27#include <kdebug.h> 27#include <kdebug.h>
28 28
29#ifdef VCARD_DEBUG 29#ifdef VCARD_DEBUG
30//US #define vDebug(a) kdDebug(5710) << a << endl; 30//US #define vDebug(a) kdDebug(5710) << a << endl;
31#define vDebug(a) qDebug(a); 31#define vDebug(a) qDebug(a);
32#else 32#else
33#define vDebug(a) 33#define vDebug(a)
34#endif 34#endif
35 35
36#if 0 36#if 0
37#ifndef NDEBUG 37#ifndef NDEBUG
38 #include <qcstring.h> 38 #include <q3cstring.h>
39 #include <iostream> 39 #include <iostream>
40 #ifdef __GNUG__ 40 #ifdef __GNUG__
41 # define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \ 41 # define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \
42 << __LINE__ << "): " << QCString((a)).data() << endl; 42 << __LINE__ << "): " << Q3CString((a)).data() << endl;
43 #else 43 #else
44 # define vDebug(a) cerr << className() << ": " \ 44 # define vDebug(a) cerr << className() << ": " \
45 << QCString((a)).data() << endl; 45 << Q3CString((a)).data() << endl;
46 #endif 46 #endif
47#else 47#else
48 #define vDebug(a) 48 #define vDebug(a)
49#endif 49#endif
50#endif 50#endif
51 51
52#endif // Included this file 52#endif // Included this file
53 53
diff --git a/kabc/vcard/include/VCardEmailParam.h b/kabc/vcard/include/VCardEmailParam.h
index 98d1b30..ff07324 100644
--- a/kabc/vcard/include/VCardEmailParam.h
+++ b/kabc/vcard/include/VCardEmailParam.h
@@ -15,42 +15,42 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef EMAILPARAM_H 24#ifndef EMAILPARAM_H
25#define EMAILPARAM_H 25#define EMAILPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class EmailParam : public Param 34class EmailParam : public Param
35{ 35{
36 36
37#include "EmailParam-generated.h" 37#include "EmailParam-generated.h"
38 38
39 QCString emailType() { parse(); return emailType_;} 39 Q3CString emailType() { parse(); return emailType_;}
40 bool pref() { parse(); return pref_; } 40 bool pref() { parse(); return pref_; }
41 41
42 void setEmailType(const QCString & s) 42 void setEmailType(const Q3CString & s)
43 { emailType_ = s; assembled_ = false; } 43 { emailType_ = s; assembled_ = false; }
44 44
45 void setPref(bool b) 45 void setPref(bool b)
46 { pref_ = b; assembled_ = false; } 46 { pref_ = b; assembled_ = false; }
47 47
48 private: 48 private:
49 49
50 QCStringemailType_; 50 Q3CStringemailType_;
51 bool pref_; 51 bool pref_;
52}; 52};
53 53
54} 54}
55 55
56#endif 56#endif
diff --git a/kabc/vcard/include/VCardEntity.h b/kabc/vcard/include/VCardEntity.h
index 3c945b5..1a3d20f 100644
--- a/kabc/vcard/include/VCardEntity.h
+++ b/kabc/vcard/include/VCardEntity.h
@@ -15,53 +15,53 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef ENTITY_H 24#ifndef ENTITY_H
25#define ENTITY_H 25#define ENTITY_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29namespace VCARD 29namespace VCARD
30{ 30{
31 31
32class Entity 32class Entity
33{ 33{
34 public: 34 public:
35 35
36 Entity(); 36 Entity();
37 Entity(const Entity & e); 37 Entity(const Entity & e);
38 Entity(const QCString & s); 38 Entity(const Q3CString & s);
39 39
40 virtual Entity & operator = (const Entity & e); 40 virtual Entity & operator = (const Entity & e);
41 virtual Entity & operator = (const QCString & s); 41 virtual Entity & operator = (const Q3CString & s);
42 42
43 virtual bool operator == (Entity & e); 43 virtual bool operator == (Entity & e);
44 virtual bool operator != (Entity & e); 44 virtual bool operator != (Entity & e);
45 virtual bool operator == (const QCString & s); 45 virtual bool operator == (const Q3CString & s);
46 virtual bool operator != (const QCString & s); 46 virtual bool operator != (const Q3CString & s);
47 47
48 virtual ~Entity(); 48 virtual ~Entity();
49 49
50 QCString asString(); 50 Q3CString asString();
51 51
52 virtual void parse(); 52 virtual void parse();
53 virtual void assemble(); 53 virtual void assemble();
54 54
55 virtual void _parse() = 0; 55 virtual void _parse() = 0;
56 virtual void _assemble() = 0; 56 virtual void _assemble() = 0;
57 57
58 protected: 58 protected:
59 59
60 QCString strRep_; 60 Q3CString strRep_;
61 bool parsed_; 61 bool parsed_;
62 bool assembled_; 62 bool assembled_;
63}; 63};
64 64
65} 65}
66 66
67#endif 67#endif
diff --git a/kabc/vcard/include/VCardEnum.h b/kabc/vcard/include/VCardEnum.h
index b4e4094..0c35e5e 100644
--- a/kabc/vcard/include/VCardEnum.h
+++ b/kabc/vcard/include/VCardEnum.h
@@ -15,30 +15,30 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef ENUM_H 24#ifndef ENUM_H
25#define ENUM_H 25#define ENUM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29namespace VCARD 29namespace VCARD
30{ 30{
31 31
32extern const QCString paramNames []; 32extern const Q3CString paramNames [];
33 33
34enum EntityType { 34enum EntityType {
35 EntityName, 35 EntityName,
36 EntityProfile, 36 EntityProfile,
37 EntitySource, 37 EntitySource,
38 EntityFullName, 38 EntityFullName,
39 EntityN, 39 EntityN,
40 EntityNickname, 40 EntityNickname,
41 EntityPhoto, 41 EntityPhoto,
42 EntityBirthday, 42 EntityBirthday,
43 EntityAddress, 43 EntityAddress,
44 EntityLabel, 44 EntityLabel,
@@ -99,22 +99,22 @@ enum ParamType {
99 ParamEmail, 99 ParamEmail,
100 ParamMailer, 100 ParamMailer,
101 ParamAgent, 101 ParamAgent,
102 ParamTextBin, 102 ParamTextBin,
103 ParamTextNS, 103 ParamTextNS,
104 ParamSound 104 ParamSound
105}; 105};
106 106
107extern const ParamType paramTypesTable[]; 107extern const ParamType paramTypesTable[];
108 108
109ParamType EntityTypeToParamType(EntityType); 109ParamType EntityTypeToParamType(EntityType);
110ValueType EntityTypeToValueType(EntityType); 110ValueType EntityTypeToValueType(EntityType);
111QCString EntityTypeToParamName(EntityType); 111Q3CString EntityTypeToParamName(EntityType);
112EntityType EntityNameToEntityType(const QCString &); 112EntityType EntityNameToEntityType(const Q3CString &);
113 113
114char * encodeBase64(const char *, unsigned long, unsigned long &); 114char * encodeBase64(const char *, unsigned long, unsigned long &);
115char * decodeBase64(const char *, unsigned long, unsigned long &); 115char * decodeBase64(const char *, unsigned long, unsigned long &);
116 116
117} 117}
118 118
119#endif 119#endif
120 120
diff --git a/kabc/vcard/include/VCardFloatValue.h b/kabc/vcard/include/VCardFloatValue.h
index 69fdc22..cac7a91 100644
--- a/kabc/vcard/include/VCardFloatValue.h
+++ b/kabc/vcard/include/VCardFloatValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef FLOATVALUE_H 24#ifndef FLOATVALUE_H
25#define FLOATVALUE_H 25#define FLOATVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class FloatValue : public Value 34class FloatValue : public Value
35{ 35{
36 36
37#include "FloatValue-generated.h" 37#include "FloatValue-generated.h"
38 38
39 FloatValue(float); 39 FloatValue(float);
diff --git a/kabc/vcard/include/VCardImageParam.h b/kabc/vcard/include/VCardImageParam.h
index ce99ccc..2785331 100644
--- a/kabc/vcard/include/VCardImageParam.h
+++ b/kabc/vcard/include/VCardImageParam.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef IMGPARAM_H 24#ifndef IMGPARAM_H
25#define IMGPARAM_H 25#define IMGPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class ImageParam : public Param 34class ImageParam : public Param
35{ 35{
36 36
37#include "ImageParam-generated.h" 37#include "ImageParam-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardImageValue.h b/kabc/vcard/include/VCardImageValue.h
index 6ce0371..3b64731 100644
--- a/kabc/vcard/include/VCardImageValue.h
+++ b/kabc/vcard/include/VCardImageValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef IMAGEVALUE_H 24#ifndef IMAGEVALUE_H
25#define IMAGEVALUE_H 25#define IMAGEVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class ImageValue : public Value 34class ImageValue : public Value
35{ 35{
36 36
37#include "ImageValue-generated.h" 37#include "ImageValue-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardLangValue.h b/kabc/vcard/include/VCardLangValue.h
index 991ceed..319de76 100644
--- a/kabc/vcard/include/VCardLangValue.h
+++ b/kabc/vcard/include/VCardLangValue.h
@@ -15,37 +15,37 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef LANGVALUE_H 24#ifndef LANGVALUE_H
25#define LANGVALUE_H 25#define LANGVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30#include <VCardValue.h> 30#include <VCardValue.h>
31 31
32namespace VCARD 32namespace VCARD
33{ 33{
34 34
35class LangValue : public Value 35class LangValue : public Value
36{ 36{
37#include "LangValue-generated.h" 37#include "LangValue-generated.h"
38 38
39 QCString primary(); 39 Q3CString primary();
40 QStrList subtags(); 40 Q3StrList subtags();
41 41
42 void setPrimary(const QCString &); 42 void setPrimary(const Q3CString &);
43 void setSubTags(const QStrList &); 43 void setSubTags(const Q3StrList &);
44 44
45 QCString primary_; 45 Q3CString primary_;
46 QStrList subtags_; 46 Q3StrList subtags_;
47}; 47};
48 48
49} 49}
50 50
51#endif 51#endif
diff --git a/kabc/vcard/include/VCardNValue.h b/kabc/vcard/include/VCardNValue.h
index 306821b..ffc5355 100644
--- a/kabc/vcard/include/VCardNValue.h
+++ b/kabc/vcard/include/VCardNValue.h
@@ -16,41 +16,43 @@
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef NVALUE_H 24#ifndef NVALUE_H
25#define NVALUE_H 25#define NVALUE_H
26 26
27#include <VCardValue.h> 27#include <VCardValue.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29namespace VCARD 31namespace VCARD
30{ 32{
31 33
32class NValue : public Value 34class NValue : public Value
33{ 35{
34#include "NValue-generated.h" 36#include "NValue-generated.h"
35 NValue *clone(); 37 NValue *clone();
36 38
37 QCString family() { parse(); return family_;} 39 Q3CString family() { parse(); return family_;}
38 QCString given() { parse(); return given_;} 40 Q3CString given() { parse(); return given_;}
39 QCString middle() { parse(); return middle_;} 41 Q3CString middle() { parse(); return middle_;}
40 QCString prefix() { parse(); return prefix_;} 42 Q3CString prefix() { parse(); return prefix_;}
41 QCString suffix() { parse(); return suffix_;} 43 Q3CString suffix() { parse(); return suffix_;}
42 44
43 void setFamily (const QCString & s) { family_= s; assembled_ = false; } 45 void setFamily (const Q3CString & s) { family_= s; assembled_ = false; }
44 void setGiven (const QCString & s) { given_= s; assembled_ = false; } 46 void setGiven (const Q3CString & s) { given_= s; assembled_ = false; }
45 void setMiddle (const QCString & s) { middle_= s; assembled_ = false; } 47 void setMiddle (const Q3CString & s) { middle_= s; assembled_ = false; }
46 void setPrefix (const QCString & s) { prefix_= s; assembled_ = false; } 48 void setPrefix (const Q3CString & s) { prefix_= s; assembled_ = false; }
47 void setSuffix (const QCString & s) { suffix_= s; assembled_ = false; } 49 void setSuffix (const Q3CString & s) { suffix_= s; assembled_ = false; }
48 50
49 private: 51 private:
50 52
51 QCString family_, given_, middle_, prefix_, suffix_; 53 Q3CString family_, given_, middle_, prefix_, suffix_;
52}; 54};
53 55
54} 56}
55 57
56#endif 58#endif
diff --git a/kabc/vcard/include/VCardOrgValue.h b/kabc/vcard/include/VCardOrgValue.h
index c4f3f25..2e5d32f 100644
--- a/kabc/vcard/include/VCardOrgValue.h
+++ b/kabc/vcard/include/VCardOrgValue.h
@@ -15,36 +15,36 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef ORGVALUE_H 24#ifndef ORGVALUE_H
25#define ORGVALUE_H 25#define ORGVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30#include <VCardValue.h> 30#include <VCardValue.h>
31 31
32namespace VCARD 32namespace VCARD
33{ 33{
34 34
35class OrgValue : public Value 35class OrgValue : public Value
36{ 36{
37 37
38#include "OrgValue-generated.h" 38#include "OrgValue-generated.h"
39 39
40 unsigned int numValues(); 40 unsigned int numValues();
41 QCString value(unsigned int); 41 Q3CString value(unsigned int);
42 42
43 private: 43 private:
44 44
45 QStrList valueList_; 45 Q3StrList valueList_;
46}; 46};
47 47
48} 48}
49 49
50#endif 50#endif
diff --git a/kabc/vcard/include/VCardParam.h b/kabc/vcard/include/VCardParam.h
index b61ce5c..b83fde1 100644
--- a/kabc/vcard/include/VCardParam.h
+++ b/kabc/vcard/include/VCardParam.h
@@ -15,45 +15,45 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef PARAM_H 24#ifndef PARAM_H
25#define PARAM_H 25#define PARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30#include <VCardEntity.h> 30#include <VCardEntity.h>
31 31
32namespace VCARD 32namespace VCARD
33{ 33{
34 34
35class Param : public Entity 35class Param : public Entity
36{ 36{
37 37
38#include "Param-generated.h" 38#include "Param-generated.h"
39 39
40 Param(const QCString &name, const QCString &value); 40 Param(const Q3CString &name, const Q3CString &value);
41 41
42 void setName(const QCString &); 42 void setName(const Q3CString &);
43 void setValue(const QCString &); 43 void setValue(const Q3CString &);
44 44
45 QCString name(); 45 Q3CString name();
46 QCString value(); 46 Q3CString value();
47 47
48 private: 48 private:
49 49
50 QCString name_; 50 Q3CString name_;
51 QCString value_; 51 Q3CString value_;
52}; 52};
53 53
54typedef QPtrList<Param> ParamList; 54typedef Q3PtrList<Param> ParamList;
55typedef QPtrListIterator<Param> ParamListIterator; 55typedef Q3PtrListIterator<Param> ParamListIterator;
56 56
57} 57}
58 58
59#endif 59#endif
diff --git a/kabc/vcard/include/VCardRToken.h b/kabc/vcard/include/VCardRToken.h
index 2f95f1b..4a5adb2 100644
--- a/kabc/vcard/include/VCardRToken.h
+++ b/kabc/vcard/include/VCardRToken.h
@@ -16,23 +16,23 @@
16 16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 20 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23*/ 23*/
24 24
25#ifndef RTOKEN_H 25#ifndef RTOKEN_H
26#define RTOKEN_H 26#define RTOKEN_H
27 27
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30namespace VCARD 30namespace VCARD
31{ 31{
32 32
33Q_UINT32 RTokenise(const char * str, const char * delim, QStrList & l); 33Q_UINT32 RTokenise(const char * str, const char * delim, Q3StrList & l);
34 34
35} 35}
36 36
37#endif 37#endif
38 38
diff --git a/kabc/vcard/include/VCardSoundValue.h b/kabc/vcard/include/VCardSoundValue.h
index 994f55e..26f750b 100644
--- a/kabc/vcard/include/VCardSoundValue.h
+++ b/kabc/vcard/include/VCardSoundValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef SOUNDVALUE_H 24#ifndef SOUNDVALUE_H
25#define SOUNDVALUE_H 25#define SOUNDVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class SoundValue : public Value 34class SoundValue : public Value
35{ 35{
36 36
37#include "SoundValue-generated.h" 37#include "SoundValue-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardSourceParam.h b/kabc/vcard/include/VCardSourceParam.h
index 887ea20..5218864 100644
--- a/kabc/vcard/include/VCardSourceParam.h
+++ b/kabc/vcard/include/VCardSourceParam.h
@@ -15,44 +15,44 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef SOURCEPARAM_H 24#ifndef SOURCEPARAM_H
25#define SOURCEPARAM_H 25#define SOURCEPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class SourceParam : public Param 34class SourceParam : public Param
35{ 35{
36 36
37#include "SourceParam-generated.h" 37#include "SourceParam-generated.h"
38 38
39 enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX }; 39 enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX };
40 40
41 SourceParamType type(){ parse(); return type_;} 41 SourceParamType type(){ parse(); return type_;}
42 QCString par() { parse(); return par_; } 42 Q3CString par() { parse(); return par_; }
43 QCString val() { parse(); return val_; } 43 Q3CString val() { parse(); return val_; }
44 44
45 void setType(SourceParamType t) { type_= t; assembled_ = false; } 45 void setType(SourceParamType t) { type_= t; assembled_ = false; }
46 void setPar(const QCString & s) { par_= s; assembled_ = false; } 46 void setPar(const Q3CString & s) { par_= s; assembled_ = false; }
47 void setVal(const QCString & s) { val_= s; assembled_ = false; } 47 void setVal(const Q3CString & s) { val_= s; assembled_ = false; }
48 48
49 private: 49 private:
50 50
51 SourceParamType type_; 51 SourceParamType type_;
52 // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR" 52 // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR"
53 QCString par_, val_; // Sub-parameter, value 53 Q3CString par_, val_; // Sub-parameter, value
54}; 54};
55 55
56} 56}
57 57
58#endif 58#endif
diff --git a/kabc/vcard/include/VCardTelParam.h b/kabc/vcard/include/VCardTelParam.h
index 27d7dcc..0c45a3a 100644
--- a/kabc/vcard/include/VCardTelParam.h
+++ b/kabc/vcard/include/VCardTelParam.h
@@ -15,37 +15,39 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef TELPARAM_H 24#ifndef TELPARAM_H
25#define TELPARAM_H 25#define TELPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28//Added by qt3to4:
29#include <Q3PtrList>
28 30
29#include <VCardParam.h> 31#include <VCardParam.h>
30 32
31namespace VCARD 33namespace VCARD
32{ 34{
33 35
34class TelParam : public Param 36class TelParam : public Param
35{ 37{
36#include "TelParam-generated.h" 38#include "TelParam-generated.h"
37 39
38 enum TelType { 40 enum TelType {
39 TelHome, TelWork, TelPref, TelVoice, TelFex, TelMsg, TelCell, 41 TelHome, TelWork, TelPref, TelVoice, TelFex, TelMsg, TelCell,
40 TelPager, TelBBS, TelModem, TelCar, TelISDN, TelVideo, TelPCS, 42 TelPager, TelBBS, TelModem, TelCar, TelISDN, TelVideo, TelPCS,
41 TelIANA, TelX 43 TelIANA, TelX
42 }; 44 };
43 45
44 private: 46 private:
45 47
46 QPtrList<TelType> types_; 48 Q3PtrList<TelType> types_;
47}; 49};
48 50
49} 51}
50 52
51#endif 53#endif
diff --git a/kabc/vcard/include/VCardTelValue.h b/kabc/vcard/include/VCardTelValue.h
index 9cf5a98..a119e4a 100644
--- a/kabc/vcard/include/VCardTelValue.h
+++ b/kabc/vcard/include/VCardTelValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef TELVALUE_H 24#ifndef TELVALUE_H
25#define TELVALUE_H 25#define TELVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class TelValue : public Value 34class TelValue : public Value
35{ 35{
36 36
37#include "TelValue-generated.h" 37#include "TelValue-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardTextBinParam.h b/kabc/vcard/include/VCardTextBinParam.h
index 31dec86..d186995 100644
--- a/kabc/vcard/include/VCardTextBinParam.h
+++ b/kabc/vcard/include/VCardTextBinParam.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef TEXTBINPARAM_H 24#ifndef TEXTBINPARAM_H
25#define TEXTBINPARAM_H 25#define TEXTBINPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class TextBinParam : public Param 34class TextBinParam : public Param
35{ 35{
36 36
37#include "TextBinParam-generated.h" 37#include "TextBinParam-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardTextBinValue.h b/kabc/vcard/include/VCardTextBinValue.h
index 8d44fdf..3924f2a 100644
--- a/kabc/vcard/include/VCardTextBinValue.h
+++ b/kabc/vcard/include/VCardTextBinValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef TEXTBINVALUE_H 24#ifndef TEXTBINVALUE_H
25#define TEXTBINVALUE_H 25#define TEXTBINVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class TextBinValue : public Value 34class TextBinValue : public Value
35{ 35{
36 36
37#include "TextBinValue-generated.h" 37#include "TextBinValue-generated.h"
38 38
39 TextBinValue *clone(); 39 TextBinValue *clone();
diff --git a/kabc/vcard/include/VCardTextListValue.h b/kabc/vcard/include/VCardTextListValue.h
index 8e47af5..ac42a29 100644
--- a/kabc/vcard/include/VCardTextListValue.h
+++ b/kabc/vcard/include/VCardTextListValue.h
@@ -15,37 +15,37 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef TEXTLISTVALUE_H 24#ifndef TEXTLISTVALUE_H
25#define TEXTLISTVALUE_H 25#define TEXTLISTVALUE_H
26 26
27#include <qstrlist.h> 27#include <q3strlist.h>
28 28
29#include <qcstring.h> 29#include <q3cstring.h>
30 30
31#include <VCardValue.h> 31#include <VCardValue.h>
32 32
33namespace VCARD 33namespace VCARD
34{ 34{
35 35
36class TextListValue : public Value 36class TextListValue : public Value
37{ 37{
38 38
39#include "TextListValue-generated.h" 39#include "TextListValue-generated.h"
40 40
41 unsigned int numValues(); 41 unsigned int numValues();
42 QCString value(unsigned int); 42 Q3CString value(unsigned int);
43 43
44 private: 44 private:
45 45
46 QStrList valueList_; 46 Q3StrList valueList_;
47}; 47};
48 48
49} 49}
50 50
51#endif 51#endif
diff --git a/kabc/vcard/include/VCardTextParam.h b/kabc/vcard/include/VCardTextParam.h
index 08b5f57..2503337 100644
--- a/kabc/vcard/include/VCardTextParam.h
+++ b/kabc/vcard/include/VCardTextParam.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef TEXTPARAM_H 24#ifndef TEXTPARAM_H
25#define TEXTPARAM_H 25#define TEXTPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class TextParam : public Param 34class TextParam : public Param
35{ 35{
36 36
37#include "TextParam-generated.h" 37#include "TextParam-generated.h"
38 38
39 private: 39 private:
diff --git a/kabc/vcard/include/VCardURIValue.h b/kabc/vcard/include/VCardURIValue.h
index 5fd7184..116e4c8 100644
--- a/kabc/vcard/include/VCardURIValue.h
+++ b/kabc/vcard/include/VCardURIValue.h
@@ -16,37 +16,39 @@
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef URIVALUE_H 24#ifndef URIVALUE_H
25#define URIVALUE_H 25#define URIVALUE_H
26 26
27#include <VCardValue.h> 27#include <VCardValue.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29namespace VCARD 31namespace VCARD
30{ 32{
31 33
32class URIValue : public Value 34class URIValue : public Value
33{ 35{
34#include "URIValue-generated.h" 36#include "URIValue-generated.h"
35 37
36 URIValue(const QCString & scheme, const QCString & schemeSpecificPart); 38 URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart);
37 39
38 QCString scheme(); 40 Q3CString scheme();
39 QCString schemeSpecificPart(); 41 Q3CString schemeSpecificPart();
40 42
41 void setScheme (const QCString &); 43 void setScheme (const Q3CString &);
42 void setSchemeSpecificPart(const QCString &); 44 void setSchemeSpecificPart(const Q3CString &);
43 45
44 private: 46 private:
45 47
46 QCString scheme_; 48 Q3CString scheme_;
47 QCString schemeSpecificPart_; 49 Q3CString schemeSpecificPart_;
48}; 50};
49 51
50} 52}
51 53
52#endif 54#endif
diff --git a/kabc/vcard/include/VCardUTCValue.h b/kabc/vcard/include/VCardUTCValue.h
index ff695e0..eb69829 100644
--- a/kabc/vcard/include/VCardUTCValue.h
+++ b/kabc/vcard/include/VCardUTCValue.h
@@ -15,25 +15,25 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef UTCVALUE_H 24#ifndef UTCVALUE_H
25#define UTCVALUE_H 25#define UTCVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class UTCValue : public Value 34class UTCValue : public Value
35{ 35{
36 36
37#include "UTCValue-generated.h" 37#include "UTCValue-generated.h"
38 38
39 UTCValue *clone(); 39 UTCValue *clone();
diff --git a/kabc/vcard/include/VCardVCard.h b/kabc/vcard/include/VCardVCard.h
index 5dec166..5b66074 100644
--- a/kabc/vcard/include/VCardVCard.h
+++ b/kabc/vcard/include/VCardVCard.h
@@ -16,48 +16,50 @@
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef VCARD_VCARD_H 24#ifndef VCARD_VCARD_H
25#define VCARD_VCARD_H 25#define VCARD_VCARD_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30#include <VCardEnum.h> 32#include <VCardEnum.h>
31#include <VCardEntity.h> 33#include <VCardEntity.h>
32#include <VCardContentLine.h> 34#include <VCardContentLine.h>
33 35
34namespace VCARD 36namespace VCARD
35{ 37{
36 38
37class VCard : public Entity 39class VCard : public Entity
38{ 40{
39 41
40#include "VCard-generated.h" 42#include "VCard-generated.h"
41 43
42 bool has(EntityType); 44 bool has(EntityType);
43 bool has(const QCString &); 45 bool has(const Q3CString &);
44 46
45 void add(const ContentLine &); 47 void add(const ContentLine &);
46 void add(const QCString &); 48 void add(const Q3CString &);
47 49
48 ContentLine * contentLine(EntityType); 50 ContentLine * contentLine(EntityType);
49 ContentLine * contentLine(const QCString &); 51 ContentLine * contentLine(const Q3CString &);
50 52
51 QCString group() { parse(); return group_; } 53 Q3CString group() { parse(); return group_; }
52 54
53 QPtrList<ContentLine>contentLineList() { parse(); return contentLineList_; } 55 Q3PtrList<ContentLine>contentLineList() { parse(); return contentLineList_; }
54 56
55 private: 57 private:
56 58
57 QCString group_; 59 Q3CString group_;
58 QPtrList<ContentLine>contentLineList_; 60 Q3PtrList<ContentLine>contentLineList_;
59}; 61};
60 62
61} 63}
62 64
63#endif 65#endif
diff --git a/kabc/vcard/include/VCardVCardEntity.h b/kabc/vcard/include/VCardVCardEntity.h
index 47ba370..8c824e7 100644
--- a/kabc/vcard/include/VCardVCardEntity.h
+++ b/kabc/vcard/include/VCardVCardEntity.h
@@ -16,35 +16,35 @@
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef VCARD_ENTITY_H 24#ifndef VCARD_ENTITY_H
25#define VCARD_ENTITY_H 25#define VCARD_ENTITY_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30#include <VCardEnum.h> 30#include <VCardEnum.h>
31#include <VCardVCard.h> 31#include <VCardVCard.h>
32#include <VCardEntity.h> 32#include <VCardEntity.h>
33 33
34namespace VCARD 34namespace VCARD
35{ 35{
36 36
37typedef QPtrList<VCard> VCardList; 37typedef Q3PtrList<VCard> VCardList;
38typedef QPtrListIterator<VCard> VCardListIterator; 38typedef Q3PtrListIterator<VCard> VCardListIterator;
39 39
40class VCardEntity : public Entity 40class VCardEntity : public Entity
41{ 41{
42 42
43#include "VCardEntity-generated.h" 43#include "VCardEntity-generated.h"
44 44
45 void setCardList(const VCardList & l); 45 void setCardList(const VCardList & l);
46 VCardList & cardList(); 46 VCardList & cardList();
47 47
48 private: 48 private:
49 49
50 VCardList cardList_; 50 VCardList cardList_;
diff --git a/kabc/vcard/include/VCardValue.h b/kabc/vcard/include/VCardValue.h
index 7cfe4a0..024397c 100644
--- a/kabc/vcard/include/VCardValue.h
+++ b/kabc/vcard/include/VCardValue.h
@@ -15,32 +15,32 @@
15 15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#ifndef VALUE_H 24#ifndef VALUE_H
25#define VALUE_H 25#define VALUE_H
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28 28
29#include <VCardEntity.h> 29#include <VCardEntity.h>
30 30
31namespace VCARD 31namespace VCARD
32{ 32{
33 33
34class Value : public Entity 34class Value : public Entity
35{ 35{
36#include "Value-generated.h" 36#include "Value-generated.h"
37 37
38 virtual Value *clone() { return new Value( *this ); } 38 virtual Value *clone() { return new Value( *this ); }
39}; 39};
40 40
41typedef QPtrList<Value> ValueList; 41typedef Q3PtrList<Value> ValueList;
42typedef QPtrListIterator<Value> ValueListIterator; 42typedef Q3PtrListIterator<Value> ValueListIterator;
43 43
44} 44}
45 45
46#endif 46#endif
diff --git a/kabc/vcard/include/generated/AdrParam-generated.h b/kabc/vcard/include/generated/AdrParam-generated.h
index 3e265d8..a11d142 100644
--- a/kabc/vcard/include/generated/AdrParam-generated.h
+++ b/kabc/vcard/include/generated/AdrParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AdrParam(); 6AdrParam();
5AdrParam(const AdrParam&); 7AdrParam(const AdrParam&);
6AdrParam(const QCString&); 8AdrParam(const Q3CString&);
7AdrParam & operator = (AdrParam&); 9AdrParam & operator = (AdrParam&);
8AdrParam & operator = (const QCString&); 10AdrParam & operator = (const Q3CString&);
9bool operator ==(AdrParam&); 11bool operator ==(AdrParam&);
10bool operator !=(AdrParam& x) {return !(*this==x);} 12bool operator !=(AdrParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AdrParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AdrParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AdrParam(); 16virtual ~AdrParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "AdrParam"; } 23const char * className() const { return "AdrParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/AdrValue-generated.h b/kabc/vcard/include/generated/AdrValue-generated.h
index e1d93e4..c0a33a3 100644
--- a/kabc/vcard/include/generated/AdrValue-generated.h
+++ b/kabc/vcard/include/generated/AdrValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AdrValue(); 6AdrValue();
5AdrValue(const AdrValue&); 7AdrValue(const AdrValue&);
6AdrValue(const QCString&); 8AdrValue(const Q3CString&);
7AdrValue & operator = (AdrValue&); 9AdrValue & operator = (AdrValue&);
8AdrValue & operator = (const QCString&); 10AdrValue & operator = (const Q3CString&);
9bool operator ==(AdrValue&); 11bool operator ==(AdrValue&);
10bool operator !=(AdrValue& x) {return !(*this==x);} 12bool operator !=(AdrValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AdrValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AdrValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AdrValue(); 16virtual ~AdrValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "AdrValue"; } 23const char * className() const { return "AdrValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/AgentParam-generated.h b/kabc/vcard/include/generated/AgentParam-generated.h
index 6423867..d5ed988 100644
--- a/kabc/vcard/include/generated/AgentParam-generated.h
+++ b/kabc/vcard/include/generated/AgentParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AgentParam(); 6AgentParam();
5AgentParam(const AgentParam&); 7AgentParam(const AgentParam&);
6AgentParam(const QCString&); 8AgentParam(const Q3CString&);
7AgentParam & operator = (AgentParam&); 9AgentParam & operator = (AgentParam&);
8AgentParam & operator = (const QCString&); 10AgentParam & operator = (const Q3CString&);
9bool operator ==(AgentParam&); 11bool operator ==(AgentParam&);
10bool operator !=(AgentParam& x) {return !(*this==x);} 12bool operator !=(AgentParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AgentParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AgentParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AgentParam(); 16virtual ~AgentParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "AgentParam"; } 23const char * className() const { return "AgentParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/AgentValue-generated.h b/kabc/vcard/include/generated/AgentValue-generated.h
index 76bb81c..eef5277 100644
--- a/kabc/vcard/include/generated/AgentValue-generated.h
+++ b/kabc/vcard/include/generated/AgentValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AgentValue(); 6AgentValue();
5AgentValue(const AgentValue&); 7AgentValue(const AgentValue&);
6AgentValue(const QCString&); 8AgentValue(const Q3CString&);
7AgentValue & operator = (AgentValue&); 9AgentValue & operator = (AgentValue&);
8AgentValue & operator = (const QCString&); 10AgentValue & operator = (const Q3CString&);
9bool operator ==(AgentValue&); 11bool operator ==(AgentValue&);
10bool operator !=(AgentValue& x) {return !(*this==x);} 12bool operator !=(AgentValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AgentValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AgentValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AgentValue(); 16virtual ~AgentValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "AgentValue"; } 23const char * className() const { return "AgentValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ClassValue-generated.h b/kabc/vcard/include/generated/ClassValue-generated.h
index df4ed5f..b84c98f 100644
--- a/kabc/vcard/include/generated/ClassValue-generated.h
+++ b/kabc/vcard/include/generated/ClassValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ClassValue(); 6ClassValue();
5ClassValue(const ClassValue&); 7ClassValue(const ClassValue&);
6ClassValue(const QCString&); 8ClassValue(const Q3CString&);
7ClassValue & operator = (ClassValue&); 9ClassValue & operator = (ClassValue&);
8ClassValue & operator = (const QCString&); 10ClassValue & operator = (const Q3CString&);
9bool operator ==(ClassValue&); 11bool operator ==(ClassValue&);
10bool operator !=(ClassValue& x) {return !(*this==x);} 12bool operator !=(ClassValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ClassValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ClassValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ClassValue(); 16virtual ~ClassValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "ClassValue"; } 23const char * className() const { return "ClassValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ContentLine-generated.h b/kabc/vcard/include/generated/ContentLine-generated.h
index 9efe273..84d0822 100644
--- a/kabc/vcard/include/generated/ContentLine-generated.h
+++ b/kabc/vcard/include/generated/ContentLine-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ContentLine(); 6ContentLine();
5ContentLine(const ContentLine&); 7ContentLine(const ContentLine&);
6ContentLine(const QCString&); 8ContentLine(const Q3CString&);
7ContentLine & operator = (ContentLine&); 9ContentLine & operator = (ContentLine&);
8ContentLine & operator = (const QCString&); 10ContentLine & operator = (const Q3CString&);
9bool operator ==(ContentLine&); 11bool operator ==(ContentLine&);
10bool operator !=(ContentLine& x) {return !(*this==x);} 12bool operator !=(ContentLine& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ContentLine a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ContentLine a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ContentLine(); 16virtual ~ContentLine();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "ContentLine"; } 23const char * className() const { return "ContentLine"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/DateParam-generated.h b/kabc/vcard/include/generated/DateParam-generated.h
index ff1da58..029c1da 100644
--- a/kabc/vcard/include/generated/DateParam-generated.h
+++ b/kabc/vcard/include/generated/DateParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4DateParam(); 6DateParam();
5DateParam(const DateParam&); 7DateParam(const DateParam&);
6DateParam(const QCString&); 8DateParam(const Q3CString&);
7DateParam & operator = (DateParam&); 9DateParam & operator = (DateParam&);
8DateParam & operator = (const QCString&); 10DateParam & operator = (const Q3CString&);
9bool operator ==(DateParam&); 11bool operator ==(DateParam&);
10bool operator !=(DateParam& x) {return !(*this==x);} 12bool operator !=(DateParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {DateParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {DateParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~DateParam(); 16virtual ~DateParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "DateParam"; } 23const char * className() const { return "DateParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/DateValue-generated.h b/kabc/vcard/include/generated/DateValue-generated.h
index a382823..70eecce 100644
--- a/kabc/vcard/include/generated/DateValue-generated.h
+++ b/kabc/vcard/include/generated/DateValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4DateValue(); 6DateValue();
5DateValue(const DateValue&); 7DateValue(const DateValue&);
6DateValue(const QCString&); 8DateValue(const Q3CString&);
7DateValue & operator = (DateValue&); 9DateValue & operator = (DateValue&);
8DateValue & operator = (const QCString&); 10DateValue & operator = (const Q3CString&);
9bool operator ==(DateValue&); 11bool operator ==(DateValue&);
10bool operator !=(DateValue& x) {return !(*this==x);} 12bool operator !=(DateValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {DateValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {DateValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~DateValue(); 16virtual ~DateValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "DateValue"; } 23const char * className() const { return "DateValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/EmailParam-generated.h b/kabc/vcard/include/generated/EmailParam-generated.h
index 428a6fc..f498931 100644
--- a/kabc/vcard/include/generated/EmailParam-generated.h
+++ b/kabc/vcard/include/generated/EmailParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4EmailParam(); 6EmailParam();
5EmailParam(const EmailParam&); 7EmailParam(const EmailParam&);
6EmailParam(const QCString&); 8EmailParam(const Q3CString&);
7EmailParam & operator = (EmailParam&); 9EmailParam & operator = (EmailParam&);
8EmailParam & operator = (const QCString&); 10EmailParam & operator = (const Q3CString&);
9bool operator ==(EmailParam&); 11bool operator ==(EmailParam&);
10bool operator !=(EmailParam& x) {return !(*this==x);} 12bool operator !=(EmailParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {EmailParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {EmailParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~EmailParam(); 16virtual ~EmailParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "EmailParam"; } 23const char * className() const { return "EmailParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/FloatValue-generated.h b/kabc/vcard/include/generated/FloatValue-generated.h
index cac55cf..c04b85f 100644
--- a/kabc/vcard/include/generated/FloatValue-generated.h
+++ b/kabc/vcard/include/generated/FloatValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4FloatValue(); 6FloatValue();
5FloatValue(const FloatValue&); 7FloatValue(const FloatValue&);
6FloatValue(const QCString&); 8FloatValue(const Q3CString&);
7FloatValue & operator = (FloatValue&); 9FloatValue & operator = (FloatValue&);
8FloatValue & operator = (const QCString&); 10FloatValue & operator = (const Q3CString&);
9bool operator ==(FloatValue&); 11bool operator ==(FloatValue&);
10bool operator !=(FloatValue& x) {return !(*this==x);} 12bool operator !=(FloatValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {FloatValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {FloatValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~FloatValue(); 16virtual ~FloatValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "FloatValue"; } 23const char * className() const { return "FloatValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/GeoValue-generated.h b/kabc/vcard/include/generated/GeoValue-generated.h
index 594f3ad..ab659bf 100644
--- a/kabc/vcard/include/generated/GeoValue-generated.h
+++ b/kabc/vcard/include/generated/GeoValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4GeoValue(); 6GeoValue();
5GeoValue(const GeoValue&); 7GeoValue(const GeoValue&);
6GeoValue(const QCString&); 8GeoValue(const Q3CString&);
7GeoValue & operator = (GeoValue&); 9GeoValue & operator = (GeoValue&);
8GeoValue & operator = (const QCString&); 10GeoValue & operator = (const Q3CString&);
9bool operator ==(GeoValue&); 11bool operator ==(GeoValue&);
10bool operator !=(GeoValue& x) {return !(*this==x);} 12bool operator !=(GeoValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {GeoValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {GeoValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~GeoValue(); 16virtual ~GeoValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "GeoValue"; } 23const char * className() const { return "GeoValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/Group-generated.h b/kabc/vcard/include/generated/Group-generated.h
index f39302d..ae16e3d 100644
--- a/kabc/vcard/include/generated/Group-generated.h
+++ b/kabc/vcard/include/generated/Group-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4Group(); 6Group();
5Group(const Group&); 7Group(const Group&);
6Group(const QCString&); 8Group(const Q3CString&);
7Group & operator = (Group&); 9Group & operator = (Group&);
8Group & operator = (const QCString&); 10Group & operator = (const Q3CString&);
9bool operator ==(Group&); 11bool operator ==(Group&);
10bool operator !=(Group& x) {return !(*this==x);} 12bool operator !=(Group& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {Group a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {Group a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~Group(); 16virtual ~Group();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "Group"; } 23const char * className() const { return "Group"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ImageParam-generated.h b/kabc/vcard/include/generated/ImageParam-generated.h
index 81edfd2..91b09a4 100644
--- a/kabc/vcard/include/generated/ImageParam-generated.h
+++ b/kabc/vcard/include/generated/ImageParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImageParam(); 6ImageParam();
5ImageParam(const ImageParam&); 7ImageParam(const ImageParam&);
6ImageParam(const QCString&); 8ImageParam(const Q3CString&);
7ImageParam & operator = (ImageParam&); 9ImageParam & operator = (ImageParam&);
8ImageParam & operator = (const QCString&); 10ImageParam & operator = (const Q3CString&);
9bool operator ==(ImageParam&); 11bool operator ==(ImageParam&);
10bool operator !=(ImageParam& x) {return !(*this==x);} 12bool operator !=(ImageParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImageParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImageParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImageParam(); 16virtual ~ImageParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "ImageParam"; } 23const char * className() const { return "ImageParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ImageValue-generated.h b/kabc/vcard/include/generated/ImageValue-generated.h
index 5a2c493..d71282e 100644
--- a/kabc/vcard/include/generated/ImageValue-generated.h
+++ b/kabc/vcard/include/generated/ImageValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImageValue(); 6ImageValue();
5ImageValue(const ImageValue&); 7ImageValue(const ImageValue&);
6ImageValue(const QCString&); 8ImageValue(const Q3CString&);
7ImageValue & operator = (ImageValue&); 9ImageValue & operator = (ImageValue&);
8ImageValue & operator = (const QCString&); 10ImageValue & operator = (const Q3CString&);
9bool operator ==(ImageValue&); 11bool operator ==(ImageValue&);
10bool operator !=(ImageValue& x) {return !(*this==x);} 12bool operator !=(ImageValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImageValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImageValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImageValue(); 16virtual ~ImageValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "ImageValue"; } 23const char * className() const { return "ImageValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ImgParam-generated.h b/kabc/vcard/include/generated/ImgParam-generated.h
index 46a6ca0..461ca6d 100644
--- a/kabc/vcard/include/generated/ImgParam-generated.h
+++ b/kabc/vcard/include/generated/ImgParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImgParam(); 6ImgParam();
5ImgParam(const ImgParam&); 7ImgParam(const ImgParam&);
6ImgParam(const QCString&); 8ImgParam(const Q3CString&);
7ImgParam & operator = (ImgParam&); 9ImgParam & operator = (ImgParam&);
8ImgParam & operator = (const QCString&); 10ImgParam & operator = (const Q3CString&);
9bool operator ==(ImgParam&); 11bool operator ==(ImgParam&);
10bool operator !=(ImgParam& x) {return !(*this==x);} 12bool operator !=(ImgParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImgParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImgParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImgParam(); 16virtual ~ImgParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21virtual const char * className() const { return "ImgParam"; } 23virtual const char * className() const { return "ImgParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ImgValue-generated.h b/kabc/vcard/include/generated/ImgValue-generated.h
index d75d545..80ee646 100644
--- a/kabc/vcard/include/generated/ImgValue-generated.h
+++ b/kabc/vcard/include/generated/ImgValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImgValue(); 6ImgValue();
5ImgValue(const ImgValue&); 7ImgValue(const ImgValue&);
6ImgValue(const QCString&); 8ImgValue(const Q3CString&);
7ImgValue & operator = (ImgValue&); 9ImgValue & operator = (ImgValue&);
8ImgValue & operator = (const QCString&); 10ImgValue & operator = (const Q3CString&);
9bool operator ==(ImgValue&); 11bool operator ==(ImgValue&);
10bool operator !=(ImgValue& x) {return !(*this==x);} 12bool operator !=(ImgValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImgValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImgValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImgValue(); 16virtual ~ImgValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21virtual const char * className() const { return "ImgValue"; } 23virtual const char * className() const { return "ImgValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/LangValue-generated.h b/kabc/vcard/include/generated/LangValue-generated.h
index 23e138b..434f762 100644
--- a/kabc/vcard/include/generated/LangValue-generated.h
+++ b/kabc/vcard/include/generated/LangValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4LangValue(); 6LangValue();
5LangValue(const LangValue&); 7LangValue(const LangValue&);
6LangValue(const QCString&); 8LangValue(const Q3CString&);
7LangValue & operator = (LangValue&); 9LangValue & operator = (LangValue&);
8LangValue & operator = (const QCString&); 10LangValue & operator = (const Q3CString&);
9bool operator ==(LangValue&); 11bool operator ==(LangValue&);
10bool operator !=(LangValue& x) {return !(*this==x);} 12bool operator !=(LangValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {LangValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {LangValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~LangValue(); 16virtual ~LangValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "LangValue"; } 23const char * className() const { return "LangValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/NValue-generated.h b/kabc/vcard/include/generated/NValue-generated.h
index 082c253..086810f 100644
--- a/kabc/vcard/include/generated/NValue-generated.h
+++ b/kabc/vcard/include/generated/NValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4NValue(); 6NValue();
5NValue(const NValue&); 7NValue(const NValue&);
6NValue(const QCString&); 8NValue(const Q3CString&);
7NValue & operator = (NValue&); 9NValue & operator = (NValue&);
8NValue & operator = (const QCString&); 10NValue & operator = (const Q3CString&);
9bool operator ==(NValue&); 11bool operator ==(NValue&);
10bool operator !=(NValue& x) {return !(*this==x);} 12bool operator !=(NValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {NValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {NValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~NValue(); 16virtual ~NValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "NValue"; } 23const char * className() const { return "NValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/Name-generated.h b/kabc/vcard/include/generated/Name-generated.h
index 0e69abd..a3bcb25 100644
--- a/kabc/vcard/include/generated/Name-generated.h
+++ b/kabc/vcard/include/generated/Name-generated.h
@@ -1,22 +1,24 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4V_Name(); 6V_Name();
5V_Name(const V_Name&); 7V_Name(const V_Name&);
6V_Name(const QCString&); 8V_Name(const Q3CString&);
7V_Name & operator = (V_Name&); 9V_Name & operator = (V_Name&);
8V_Name & operator = (const QCString&); 10V_Name & operator = (const Q3CString&);
9bool operator ==(V_Name&); 11bool operator ==(V_Name&);
10bool operator !=(V_Name& x) {return !(*this==x);} 12bool operator !=(V_Name& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {V_Name a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {V_Name a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~V_Name(); 16virtual ~V_Name();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21 23
22// End of automatically generated code // 24// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/OrgValue-generated.h b/kabc/vcard/include/generated/OrgValue-generated.h
index 51eb1b7..275f56f 100644
--- a/kabc/vcard/include/generated/OrgValue-generated.h
+++ b/kabc/vcard/include/generated/OrgValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4OrgValue(); 6OrgValue();
5OrgValue(const OrgValue&); 7OrgValue(const OrgValue&);
6OrgValue(const QCString&); 8OrgValue(const Q3CString&);
7OrgValue & operator = (OrgValue&); 9OrgValue & operator = (OrgValue&);
8OrgValue & operator = (const QCString&); 10OrgValue & operator = (const Q3CString&);
9bool operator ==(OrgValue&); 11bool operator ==(OrgValue&);
10bool operator !=(OrgValue& x) {return !(*this==x);} 12bool operator !=(OrgValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {OrgValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {OrgValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~OrgValue(); 16virtual ~OrgValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "OrgValue"; } 23const char * className() const { return "OrgValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/Param-generated.h b/kabc/vcard/include/generated/Param-generated.h
index cf4666a..1a35166 100644
--- a/kabc/vcard/include/generated/Param-generated.h
+++ b/kabc/vcard/include/generated/Param-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4Param(); 6Param();
5Param(const Param&); 7Param(const Param&);
6Param(const QCString&); 8Param(const Q3CString&);
7Param & operator = (Param&); 9Param & operator = (Param&);
8Param & operator = (const QCString&); 10Param & operator = (const Q3CString&);
9bool operator ==(Param&); 11bool operator ==(Param&);
10bool operator !=(Param& x) {return !(*this==x);} 12bool operator !=(Param& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {Param a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {Param a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~Param(); 16virtual ~Param();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "Param"; } 23const char * className() const { return "Param"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ParamName-generated.h b/kabc/vcard/include/generated/ParamName-generated.h
index ef673c3..b45022e 100644
--- a/kabc/vcard/include/generated/ParamName-generated.h
+++ b/kabc/vcard/include/generated/ParamName-generated.h
@@ -1,22 +1,24 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4V_ParamName(); 6V_ParamName();
5V_ParamName(const V_ParamName&); 7V_ParamName(const V_ParamName&);
6V_ParamName(const QCString&); 8V_ParamName(const Q3CString&);
7V_ParamName & operator = (V_ParamName&); 9V_ParamName & operator = (V_ParamName&);
8V_ParamName & operator = (const QCString&); 10V_ParamName & operator = (const Q3CString&);
9bool operator ==(V_ParamName&); 11bool operator ==(V_ParamName&);
10bool operator !=(V_ParamName& x) {return !(*this==x);} 12bool operator !=(V_ParamName& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {V_ParamName a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {V_ParamName a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~V_ParamName(); 16virtual ~V_ParamName();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21 23
22// End of automatically generated code // 24// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/ParamValue-generated.h b/kabc/vcard/include/generated/ParamValue-generated.h
index e73500f..956c8da 100644
--- a/kabc/vcard/include/generated/ParamValue-generated.h
+++ b/kabc/vcard/include/generated/ParamValue-generated.h
@@ -1,22 +1,24 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4V_ParamValue(); 6V_ParamValue();
5V_ParamValue(const V_ParamValue&); 7V_ParamValue(const V_ParamValue&);
6V_ParamValue(const QCString&); 8V_ParamValue(const Q3CString&);
7V_ParamValue & operator = (V_ParamValue&); 9V_ParamValue & operator = (V_ParamValue&);
8V_ParamValue & operator = (const QCString&); 10V_ParamValue & operator = (const Q3CString&);
9bool operator ==(V_ParamValue&); 11bool operator ==(V_ParamValue&);
10bool operator !=(V_ParamValue& x) {return !(*this==x);} 12bool operator !=(V_ParamValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {V_ParamValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {V_ParamValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~V_ParamValue(); 16virtual ~V_ParamValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21 23
22// End of automatically generated code // 24// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/PhoneNumberValue-generated.h b/kabc/vcard/include/generated/PhoneNumberValue-generated.h
index 1320f18..0d206f4 100644
--- a/kabc/vcard/include/generated/PhoneNumberValue-generated.h
+++ b/kabc/vcard/include/generated/PhoneNumberValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4PhoneNumberValue(); 6PhoneNumberValue();
5PhoneNumberValue(const PhoneNumberValue&); 7PhoneNumberValue(const PhoneNumberValue&);
6PhoneNumberValue(const QCString&); 8PhoneNumberValue(const Q3CString&);
7PhoneNumberValue & operator = (PhoneNumberValue&); 9PhoneNumberValue & operator = (PhoneNumberValue&);
8PhoneNumberValue & operator = (const QCString&); 10PhoneNumberValue & operator = (const Q3CString&);
9bool operator ==(PhoneNumberValue&); 11bool operator ==(PhoneNumberValue&);
10bool operator !=(PhoneNumberValue& x) {return !(*this==x);} 12bool operator !=(PhoneNumberValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {PhoneNumberValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {PhoneNumberValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~PhoneNumberValue(); 16virtual ~PhoneNumberValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "PhoneNumberValue"; } 23const char * className() const { return "PhoneNumberValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/SoundValue-generated.h b/kabc/vcard/include/generated/SoundValue-generated.h
index a9ab2e8..2cc9c0d 100644
--- a/kabc/vcard/include/generated/SoundValue-generated.h
+++ b/kabc/vcard/include/generated/SoundValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4SoundValue(); 6SoundValue();
5SoundValue(const SoundValue&); 7SoundValue(const SoundValue&);
6SoundValue(const QCString&); 8SoundValue(const Q3CString&);
7SoundValue & operator = (SoundValue&); 9SoundValue & operator = (SoundValue&);
8SoundValue & operator = (const QCString&); 10SoundValue & operator = (const Q3CString&);
9bool operator ==(SoundValue&); 11bool operator ==(SoundValue&);
10bool operator !=(SoundValue& x) {return !(*this==x);} 12bool operator !=(SoundValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {SoundValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {SoundValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~SoundValue(); 16virtual ~SoundValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "SoundValue"; } 23const char * className() const { return "SoundValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/SourceParam-generated.h b/kabc/vcard/include/generated/SourceParam-generated.h
index 75fefb8..537e093 100644
--- a/kabc/vcard/include/generated/SourceParam-generated.h
+++ b/kabc/vcard/include/generated/SourceParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4SourceParam(); 6SourceParam();
5SourceParam(const SourceParam&); 7SourceParam(const SourceParam&);
6SourceParam(const QCString&); 8SourceParam(const Q3CString&);
7SourceParam & operator = (SourceParam&); 9SourceParam & operator = (SourceParam&);
8SourceParam & operator = (const QCString&); 10SourceParam & operator = (const Q3CString&);
9bool operator ==(SourceParam&); 11bool operator ==(SourceParam&);
10bool operator !=(SourceParam& x) {return !(*this==x);} 12bool operator !=(SourceParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {SourceParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {SourceParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~SourceParam(); 16virtual ~SourceParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "SourceParam"; } 23const char * className() const { return "SourceParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TelParam-generated.h b/kabc/vcard/include/generated/TelParam-generated.h
index 3ee77cc..8d9ba0f 100644
--- a/kabc/vcard/include/generated/TelParam-generated.h
+++ b/kabc/vcard/include/generated/TelParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TelParam(); 6TelParam();
5TelParam(const TelParam&); 7TelParam(const TelParam&);
6TelParam(const QCString&); 8TelParam(const Q3CString&);
7TelParam & operator = (TelParam&); 9TelParam & operator = (TelParam&);
8TelParam & operator = (const QCString&); 10TelParam & operator = (const Q3CString&);
9bool operator ==(TelParam&); 11bool operator ==(TelParam&);
10bool operator !=(TelParam& x) {return !(*this==x);} 12bool operator !=(TelParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TelParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TelParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TelParam(); 16virtual ~TelParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TelParam"; } 23const char * className() const { return "TelParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TelValue-generated.h b/kabc/vcard/include/generated/TelValue-generated.h
index 3213e1c..b72fa7d 100644
--- a/kabc/vcard/include/generated/TelValue-generated.h
+++ b/kabc/vcard/include/generated/TelValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TelValue(); 6TelValue();
5TelValue(const TelValue&); 7TelValue(const TelValue&);
6TelValue(const QCString&); 8TelValue(const Q3CString&);
7TelValue & operator = (TelValue&); 9TelValue & operator = (TelValue&);
8TelValue & operator = (const QCString&); 10TelValue & operator = (const Q3CString&);
9bool operator ==(TelValue&); 11bool operator ==(TelValue&);
10bool operator !=(TelValue& x) {return !(*this==x);} 12bool operator !=(TelValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TelValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TelValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TelValue(); 16virtual ~TelValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TelValue"; } 23const char * className() const { return "TelValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TextBinParam-generated.h b/kabc/vcard/include/generated/TextBinParam-generated.h
index d075c10..2e433b0 100644
--- a/kabc/vcard/include/generated/TextBinParam-generated.h
+++ b/kabc/vcard/include/generated/TextBinParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextBinParam(); 6TextBinParam();
5TextBinParam(const TextBinParam&); 7TextBinParam(const TextBinParam&);
6TextBinParam(const QCString&); 8TextBinParam(const Q3CString&);
7TextBinParam & operator = (TextBinParam&); 9TextBinParam & operator = (TextBinParam&);
8TextBinParam & operator = (const QCString&); 10TextBinParam & operator = (const Q3CString&);
9bool operator ==(TextBinParam&); 11bool operator ==(TextBinParam&);
10bool operator !=(TextBinParam& x) {return !(*this==x);} 12bool operator !=(TextBinParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextBinParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextBinParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextBinParam(); 16virtual ~TextBinParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TextBinParam"; } 23const char * className() const { return "TextBinParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TextBinValue-generated.h b/kabc/vcard/include/generated/TextBinValue-generated.h
index e9553ac..bc3ad61 100644
--- a/kabc/vcard/include/generated/TextBinValue-generated.h
+++ b/kabc/vcard/include/generated/TextBinValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextBinValue(); 6TextBinValue();
5TextBinValue(const TextBinValue&); 7TextBinValue(const TextBinValue&);
6TextBinValue(const QCString&); 8TextBinValue(const Q3CString&);
7TextBinValue & operator = (TextBinValue&); 9TextBinValue & operator = (TextBinValue&);
8TextBinValue & operator = (const QCString&); 10TextBinValue & operator = (const Q3CString&);
9bool operator ==(TextBinValue&); 11bool operator ==(TextBinValue&);
10bool operator !=(TextBinValue& x) {return !(*this==x);} 12bool operator !=(TextBinValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextBinValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextBinValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextBinValue(); 16virtual ~TextBinValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TextBinValue"; } 23const char * className() const { return "TextBinValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TextListValue-generated.h b/kabc/vcard/include/generated/TextListValue-generated.h
index 9f46124..9df8a46 100644
--- a/kabc/vcard/include/generated/TextListValue-generated.h
+++ b/kabc/vcard/include/generated/TextListValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextListValue(); 6TextListValue();
5TextListValue(const TextListValue&); 7TextListValue(const TextListValue&);
6TextListValue(const QCString&); 8TextListValue(const Q3CString&);
7TextListValue & operator = (TextListValue&); 9TextListValue & operator = (TextListValue&);
8TextListValue & operator = (const QCString&); 10TextListValue & operator = (const Q3CString&);
9bool operator ==(TextListValue&); 11bool operator ==(TextListValue&);
10bool operator !=(TextListValue& x) {return !(*this==x);} 12bool operator !=(TextListValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextListValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextListValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextListValue(); 16virtual ~TextListValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TextListValue"; } 23const char * className() const { return "TextListValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TextNSParam-generated.h b/kabc/vcard/include/generated/TextNSParam-generated.h
index d7f58ca..8842bd6 100644
--- a/kabc/vcard/include/generated/TextNSParam-generated.h
+++ b/kabc/vcard/include/generated/TextNSParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextNSParam(); 6TextNSParam();
5TextNSParam(const TextNSParam&); 7TextNSParam(const TextNSParam&);
6TextNSParam(const QCString&); 8TextNSParam(const Q3CString&);
7TextNSParam & operator = (TextNSParam&); 9TextNSParam & operator = (TextNSParam&);
8TextNSParam & operator = (const QCString&); 10TextNSParam & operator = (const Q3CString&);
9bool operator ==(TextNSParam&); 11bool operator ==(TextNSParam&);
10bool operator !=(TextNSParam& x) {return !(*this==x);} 12bool operator !=(TextNSParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextNSParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextNSParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextNSParam(); 16virtual ~TextNSParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TextNSParam"; } 23const char * className() const { return "TextNSParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TextParam-generated.h b/kabc/vcard/include/generated/TextParam-generated.h
index 154e1bf..e56a8a5 100644
--- a/kabc/vcard/include/generated/TextParam-generated.h
+++ b/kabc/vcard/include/generated/TextParam-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextParam(); 6TextParam();
5TextParam(const TextParam&); 7TextParam(const TextParam&);
6TextParam(const QCString&); 8TextParam(const Q3CString&);
7TextParam & operator = (TextParam&); 9TextParam & operator = (TextParam&);
8TextParam & operator = (const QCString&); 10TextParam & operator = (const Q3CString&);
9bool operator ==(TextParam&); 11bool operator ==(TextParam&);
10bool operator !=(TextParam& x) {return !(*this==x);} 12bool operator !=(TextParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextParam(); 16virtual ~TextParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TextParam"; } 23const char * className() const { return "TextParam"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/TextValue-generated.h b/kabc/vcard/include/generated/TextValue-generated.h
index e1c4dcc..3f205e0 100644
--- a/kabc/vcard/include/generated/TextValue-generated.h
+++ b/kabc/vcard/include/generated/TextValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextValue(); 6TextValue();
5TextValue(const TextValue&); 7TextValue(const TextValue&);
6TextValue(const QCString&); 8TextValue(const Q3CString&);
7TextValue & operator = (TextValue&); 9TextValue & operator = (TextValue&);
8TextValue & operator = (const QCString&); 10TextValue & operator = (const Q3CString&);
9bool operator ==(TextValue&); 11bool operator ==(TextValue&);
10bool operator !=(TextValue& x) {return !(*this==x);} 12bool operator !=(TextValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextValue(); 16virtual ~TextValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "TextValue"; } 23const char * className() const { return "TextValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/URIValue-generated.h b/kabc/vcard/include/generated/URIValue-generated.h
index dbcb5c1..464178f 100644
--- a/kabc/vcard/include/generated/URIValue-generated.h
+++ b/kabc/vcard/include/generated/URIValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4URIValue(); 6URIValue();
5URIValue(const URIValue&); 7URIValue(const URIValue&);
6URIValue(const QCString&); 8URIValue(const Q3CString&);
7URIValue & operator = (URIValue&); 9URIValue & operator = (URIValue&);
8URIValue & operator = (const QCString&); 10URIValue & operator = (const Q3CString&);
9bool operator ==(URIValue&); 11bool operator ==(URIValue&);
10bool operator !=(URIValue& x) {return !(*this==x);} 12bool operator !=(URIValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {URIValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {URIValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~URIValue(); 16virtual ~URIValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "URIValue"; } 23const char * className() const { return "URIValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/UTCValue-generated.h b/kabc/vcard/include/generated/UTCValue-generated.h
index 46e447b..1a34b5c 100644
--- a/kabc/vcard/include/generated/UTCValue-generated.h
+++ b/kabc/vcard/include/generated/UTCValue-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4UTCValue(); 6UTCValue();
5UTCValue(const UTCValue&); 7UTCValue(const UTCValue&);
6UTCValue(const QCString&); 8UTCValue(const Q3CString&);
7UTCValue & operator = (UTCValue&); 9UTCValue & operator = (UTCValue&);
8UTCValue & operator = (const QCString&); 10UTCValue & operator = (const Q3CString&);
9bool operator ==(UTCValue&); 11bool operator ==(UTCValue&);
10bool operator !=(UTCValue& x) {return !(*this==x);} 12bool operator !=(UTCValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {UTCValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {UTCValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~UTCValue(); 16virtual ~UTCValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "UTCValue"; } 23const char * className() const { return "UTCValue"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/VCard-generated.h b/kabc/vcard/include/generated/VCard-generated.h
index 4d7d96d..d09c789 100644
--- a/kabc/vcard/include/generated/VCard-generated.h
+++ b/kabc/vcard/include/generated/VCard-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4VCard(); 6VCard();
5VCard(const VCard&); 7VCard(const VCard&);
6VCard(const QCString&); 8VCard(const Q3CString&);
7VCard & operator = (VCard&); 9VCard & operator = (VCard&);
8VCard & operator = (const QCString&); 10VCard & operator = (const Q3CString&);
9bool operator ==(VCard&); 11bool operator ==(VCard&);
10bool operator !=(VCard& x) {return !(*this==x);} 12bool operator !=(VCard& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {VCard a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {VCard a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~VCard(); 16virtual ~VCard();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "VCard"; } 23const char * className() const { return "VCard"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/VCardEntity-generated.h b/kabc/vcard/include/generated/VCardEntity-generated.h
index 9f2dfbc..cbbe8e1 100644
--- a/kabc/vcard/include/generated/VCardEntity-generated.h
+++ b/kabc/vcard/include/generated/VCardEntity-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4VCardEntity(); 6VCardEntity();
5VCardEntity(const VCardEntity&); 7VCardEntity(const VCardEntity&);
6VCardEntity(const QCString&); 8VCardEntity(const Q3CString&);
7VCardEntity & operator = (VCardEntity&); 9VCardEntity & operator = (VCardEntity&);
8VCardEntity & operator = (const QCString&); 10VCardEntity & operator = (const Q3CString&);
9bool operator ==(VCardEntity&); 11bool operator ==(VCardEntity&);
10bool operator !=(VCardEntity& x) {return !(*this==x);} 12bool operator !=(VCardEntity& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {VCardEntity a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {VCardEntity a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~VCardEntity(); 16virtual ~VCardEntity();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "VCardEntity"; } 23const char * className() const { return "VCardEntity"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/include/generated/Value-generated.h b/kabc/vcard/include/generated/Value-generated.h
index 7afac34..142e720 100644
--- a/kabc/vcard/include/generated/Value-generated.h
+++ b/kabc/vcard/include/generated/Value-generated.h
@@ -1,23 +1,25 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4Value(); 6Value();
5Value(const Value&); 7Value(const Value&);
6Value(const QCString&); 8Value(const Q3CString&);
7Value & operator = (Value&); 9Value & operator = (Value&);
8Value & operator = (const QCString&); 10Value & operator = (const Q3CString&);
9bool operator ==(Value&); 11bool operator ==(Value&);
10bool operator !=(Value& x) {return !(*this==x);} 12bool operator !=(Value& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {Value a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {Value a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~Value(); 16virtual ~Value();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
16 18
17void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;} 19void assemble() {if(assembled_) return;parse();_assemble();assembled_=true;}
18 20
19void _parse(); 21void _parse();
20void _assemble(); 22void _assemble();
21const char * className() const { return "Value"; } 23const char * className() const { return "Value"; }
22 24
23// End of automatically generated code // 25// End of automatically generated code //
diff --git a/kabc/vcard/testread.cpp b/kabc/vcard/testread.cpp
index 919c661..4d66aaf 100644
--- a/kabc/vcard/testread.cpp
+++ b/kabc/vcard/testread.cpp
@@ -1,40 +1,42 @@
1#include <iostream> 1#include <iostream>
2#include <stdlib.h> 2#include <stdlib.h>
3#include <assert.h> 3#include <assert.h>
4 4
5#include <qfile.h> 5#include <qfile.h>
6#include <qtextstream.h> 6#include <q3textstream.h>
7//Added by qt3to4:
8#include <Q3CString>
7 9
8#include <VCard.h> 10#include <VCard.h>
9 11
10using namespace std; 12using namespace std;
11 13
12int main(int argc, char * argv[]) 14int main(int argc, char * argv[])
13{ 15{
14 if (argc != 2) { 16 if (argc != 2) {
15 cerr << "Usage: " << argv[0] << " <filename>" << endl; 17 cerr << "Usage: " << argv[0] << " <filename>" << endl;
16 exit(1); 18 exit(1);
17 } 19 }
18 20
19 QFile f(argv[1]); 21 QFile f(argv[1]);
20 22
21 QCString str; 23 Q3CString str;
22 24
23 if (!f.open(IO_ReadOnly)) { 25 if (!f.open(QIODevice::ReadOnly)) {
24 cerr << "Couldn't open file \"" << argv[1] << endl; 26 cerr << "Couldn't open file \"" << argv[1] << endl;
25 exit(1); 27 exit(1);
26 } 28 }
27 29
28 QTextStream t(&f); 30 Q3TextStream t(&f);
29 31
30 while (!t.eof()) 32 while (!t.eof())
31 str += t.readLine().utf8() + '\n'; 33 str += t.readLine().utf8() + '\n';
32 34
33 using namespace VCARD; 35 using namespace VCARD;
34 36
35 // Iterate through all vCards in the file. 37 // Iterate through all vCards in the file.
36 38
37 cout << "--------- begin ----------" << endl; 39 cout << "--------- begin ----------" << endl;
38 cout << str.data(); 40 cout << str.data();
39 cout << "--------- end ----------" << endl; 41 cout << "--------- end ----------" << endl;
40 42
@@ -43,25 +45,25 @@ int main(int argc, char * argv[])
43 VCardListIterator it(e.cardList()); 45 VCardListIterator it(e.cardList());
44 46
45 for (; it.current(); ++it) { 47 for (; it.current(); ++it) {
46 48
47 cerr << "****************** VCARD ********************" << endl; 49 cerr << "****************** VCARD ********************" << endl;
48 50
49 // Create a vcard using the string representation. 51 // Create a vcard using the string representation.
50 VCard & v (*it.current()); 52 VCard & v (*it.current());
51 53
52 if (v.has(EntityEmail)) { 54 if (v.has(EntityEmail)) {
53 cerr << "Email parameter found" << endl; 55 cerr << "Email parameter found" << endl;
54 56
55 QCString s = v.contentLine(EntityEmail)->value()->asString(); 57 Q3CString s = v.contentLine(EntityEmail)->value()->asString();
56 58
57 cerr << "Email value == " << s << endl; 59 cerr << "Email value == " << s << endl;
58 } 60 }
59 61
60 if (v.has(EntityNickname)) { 62 if (v.has(EntityNickname)) {
61 cerr << "Nickname parameter found" << endl; 63 cerr << "Nickname parameter found" << endl;
62 64
63 cerr << "Nickname value == " << 65 cerr << "Nickname value == " <<
64 v.contentLine(EntityNickname)->value()->asString() << 66 v.contentLine(EntityNickname)->value()->asString() <<
65 endl; 67 endl;
66 } 68 }
67 69
diff --git a/kabc/vcard/testwrite.cpp b/kabc/vcard/testwrite.cpp
index e4bbe7b..846e51a 100644
--- a/kabc/vcard/testwrite.cpp
+++ b/kabc/vcard/testwrite.cpp
@@ -1,19 +1,21 @@
1#include <kaboutdata.h> 1#include <kaboutdata.h>
2#include <kapplication.h> 2#include <kapplication.h>
3#include <kdebug.h> 3#include <kdebug.h>
4#include <klocale.h> 4#include <klocale.h>
5#include <kcmdlineargs.h> 5#include <kcmdlineargs.h>
6 6
7#include <VCard.h> 7#include <VCard.h>
8//Added by qt3to4:
9#include <Q3CString>
8 10
9int main(int argc,char **argv) 11int main(int argc,char **argv)
10{ 12{
11 KAboutData aboutData("testwrite",I18N_NOOP("TestWritevCard"),"0.1"); 13 KAboutData aboutData("testwrite",I18N_NOOP("TestWritevCard"),"0.1");
12 KCmdLineArgs::init(argc,argv,&aboutData); 14 KCmdLineArgs::init(argc,argv,&aboutData);
13 15
14 KApplication app; 16 KApplication app;
15 17
16 kdDebug() << "Test Write VCard" << endl; 18 kdDebug() << "Test Write VCard" << endl;
17 19
18 using namespace VCARD; 20 using namespace VCARD;
19 21
@@ -24,18 +26,18 @@ int main(int argc,char **argv)
24 cl1.setValue(new TextValue("Hans Wurst")); 26 cl1.setValue(new TextValue("Hans Wurst"));
25 v.add(cl1); 27 v.add(cl1);
26 28
27 ContentLine cl2; 29 ContentLine cl2;
28 cl2.setName(EntityTypeToParamName(EntityTelephone)); 30 cl2.setName(EntityTypeToParamName(EntityTelephone));
29 cl2.setValue(new TelValue("12345")); 31 cl2.setValue(new TelValue("12345"));
30 ParamList p; 32 ParamList p;
31 p.append( new TelParam("home") ); 33 p.append( new TelParam("home") );
32 p.append( new TelParam("fax") ); 34 p.append( new TelParam("fax") );
33 cl2.setParamList( p ); 35 cl2.setParamList( p );
34 v.add(cl2); 36 v.add(cl2);
35 37
36 QCString str = v.asString(); 38 Q3CString str = v.asString();
37 39
38 kdDebug() << "--- VCard begin ---" << endl 40 kdDebug() << "--- VCard begin ---" << endl
39 << str 41 << str
40 << "--- VCard end ---" << endl; 42 << "--- VCard end ---" << endl;
41} 43}
diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp
index 60d02b8..e24a9dc 100644
--- a/kabc/vcard21parser.cpp
+++ b/kabc/vcard21parser.cpp
@@ -18,43 +18,45 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <qmap.h> 28#include <qmap.h>
29#include <qregexp.h> 29#include <qregexp.h>
30//Added by qt3to4:
31#include <Q3ValueList>
30#include <kmdcodec.h> 32#include <kmdcodec.h>
31 33
32#include "vcard21parser.h" 34#include "vcard21parser.h"
33#include "vcardconverter.h" 35#include "vcardconverter.h"
34 36
35using namespace KABC; 37using namespace KABC;
36 38
37bool VCardLineX::isValid() const 39bool VCardLineX::isValid() const
38{ 40{
39 // Invalid: if it is "begin:vcard" or "end:vcard" 41 // Invalid: if it is "begin:vcard" or "end:vcard"
40 if ( name == VCARD_BEGIN_N || name == VCARD_END_N ) 42 if ( name == VCARD_BEGIN_N || name == VCARD_END_N )
41 return false; 43 return false;
42 44
43 if ( name[0] == 'x' && name[1] == '-' ) // A custom x- line 45 if ( name[0] == 'x' && name[1] == '-' ) // A custom x- line
44 return true; 46 return true;
45 47
46 // This is long but it makes it a bit faster (and saves me from using 48 // This is long but it makes it a bit faster (and saves me from using
47 // a tree which is probably the ideal situation, but a bit memory heavy) 49 // a tree which is probably the ideal situation, but a bit memory heavy)
48 switch( name[0] ) { 50 switch( name[0].unicode() ) {
49 case 'a': 51 case 'a':
50 if ( name == VCARD_ADR && qualified && 52 if ( name == VCARD_ADR && qualified &&
51 (qualifiers.contains(VCARD_ADR_DOM) || 53 (qualifiers.contains(VCARD_ADR_DOM) ||
52 qualifiers.contains(VCARD_ADR_INTL) || 54 qualifiers.contains(VCARD_ADR_INTL) ||
53 qualifiers.contains(VCARD_ADR_POSTAL) || 55 qualifiers.contains(VCARD_ADR_POSTAL) ||
54 qualifiers.contains(VCARD_ADR_HOME) || 56 qualifiers.contains(VCARD_ADR_HOME) ||
55 qualifiers.contains(VCARD_ADR_WORK) || 57 qualifiers.contains(VCARD_ADR_WORK) ||
56 qualifiers.contains(VCARD_ADR_PREF) 58 qualifiers.contains(VCARD_ADR_PREF)
57 ) ) 59 ) )
58 return true; 60 return true;
59 61
60 if ( name == VCARD_AGENT ) 62 if ( name == VCARD_AGENT )
@@ -260,25 +262,25 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
260 tmpStr = mVCard->getValue(VCARD_URL); 262 tmpStr = mVCard->getValue(VCARD_URL);
261 if (tmpStr.isEmpty()) tmpStr = mVCard->getValue(VCARD_URL, VCARD_ADR_WORK); 263 if (tmpStr.isEmpty()) tmpStr = mVCard->getValue(VCARD_URL, VCARD_ADR_WORK);
262 if (tmpStr.isEmpty()) tmpStr = mVCard->getValue(VCARD_URL, VCARD_ADR_HOME); 264 if (tmpStr.isEmpty()) tmpStr = mVCard->getValue(VCARD_URL, VCARD_ADR_HOME);
263 if (!tmpStr.isEmpty()) { 265 if (!tmpStr.isEmpty()) {
264 addressee.setUrl(KURL(tmpStr)); 266 addressee.setUrl(KURL(tmpStr));
265 } 267 }
266 268
267 //set the addressee's birthday 269 //set the addressee's birthday
268 tmpStr = mVCard->getValue(VCARD_BDAY); 270 tmpStr = mVCard->getValue(VCARD_BDAY);
269 addressee.setBirthday(VCardStringToDate(tmpStr)); 271 addressee.setBirthday(VCardStringToDate(tmpStr));
270 272
271 //set the addressee's phone numbers 273 //set the addressee's phone numbers
272 for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { 274 for ( Q3ValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) {
273 if ( (*i).name == VCARD_TEL ) { 275 if ( (*i).name == VCARD_TEL ) {
274 int type = 0; 276 int type = 0;
275 if ( (*i).qualified ) { 277 if ( (*i).qualified ) {
276 if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) 278 if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) )
277 type |= PhoneNumber::Home; 279 type |= PhoneNumber::Home;
278 if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) 280 if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) )
279 type |= PhoneNumber::Work; 281 type |= PhoneNumber::Work;
280 if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) 282 if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) )
281 type |= PhoneNumber::Pref; 283 type |= PhoneNumber::Pref;
282 if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) 284 if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) )
283 type |= PhoneNumber::Voice; 285 type |= PhoneNumber::Voice;
284 if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) 286 if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) )
@@ -299,44 +301,47 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
299 type |= PhoneNumber::Isdn; 301 type |= PhoneNumber::Isdn;
300 if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) 302 if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) )
301 type |= PhoneNumber::Video; 303 type |= PhoneNumber::Video;
302 if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) 304 if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) )
303 type |= PhoneNumber::Pcs; 305 type |= PhoneNumber::Pcs;
304 306
305 } 307 }
306 addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); 308 addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) );
307 } 309 }
308 } 310 }
309 addressee.makePhoneNumbersOLcompatible(); 311 addressee.makePhoneNumbersOLcompatible();
310 //set the addressee's addresses 312 //set the addressee's addresses
311 for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { 313 for ( Q3ValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) {
312 if ( (*i).name == VCARD_ADR ) { 314 if ( (*i).name == VCARD_ADR ) {
313 int type = 0; 315 int type = 0;
314 if ( (*i).qualified ) { 316 if ( (*i).qualified ) {
315 if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) 317 if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) )
316 type |= Address::Dom; 318 type |= Address::Dom;
317 if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) 319 if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) )
318 type |= Address::Intl; 320 type |= Address::Intl;
319 if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) 321 if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) )
320 type |= Address::Postal; 322 type |= Address::Postal;
321 if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) 323 if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) )
322 type |= Address::Parcel; 324 type |= Address::Parcel;
323 if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) 325 if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) )
324 type |= Address::Home; 326 type |= Address::Home;
325 if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) 327 if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) )
326 type |= Address::Work; 328 type |= Address::Work;
327 if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) 329 if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) )
328 type |= Address::Pref; 330 type |= Address::Pref;
329 } 331 }
330 addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); 332 QStringList tmp;
333 for(Q3ValueList<QString>::const_iterator ii=(*i).parameters.begin();ii!=(*i).parameters.end();++ii)
334 tmp.push_back(*ii);
335 addressee.insertAddress( readAddressFromQStringList( tmp, type ) );
331 } 336 }
332 } 337 }
333 338
334 //set the addressee's delivery label 339 //set the addressee's delivery label
335 tmpStr = mVCard->getValue(VCARD_LABEL); 340 tmpStr = mVCard->getValue(VCARD_LABEL);
336 if (!tmpStr.isEmpty()) { 341 if (!tmpStr.isEmpty()) {
337qDebug("VCard21Parser::readFromString please verify if replace is correct"); 342qDebug("VCard21Parser::readFromString please verify if replace is correct");
338//US tmpStr.replace("\r\n","\n"); 343//US tmpStr.replace("\r\n","\n");
339 tmpStr.replace( QRegExp("\r\n"), "\n" ); 344 tmpStr.replace( QRegExp("\r\n"), "\n" );
340 Address tmpAddress; 345 Address tmpAddress;
341 tmpAddress.setLabel(tmpStr); 346 tmpAddress.setLabel(tmpStr);
342 addressee.insertAddress(tmpAddress); 347 addressee.insertAddress(tmpAddress);
@@ -399,28 +404,28 @@ KABC::Address VCard21Parser::readAddressFromQStringList ( const QStringList &dat
399 if ( data.count() > 6 ) 404 if ( data.count() > 6 )
400 mAddress.setCountry( data[6] ); 405 mAddress.setCountry( data[6] );
401 406
402 return mAddress; 407 return mAddress;
403} 408}
404 409
405 410
406VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err ) 411VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
407{ 412{
408 int _err = 0; 413 int _err = 0;
409 int _state = VC_STATE_BEGIN; 414 int _state = VC_STATE_BEGIN;
410 415
411 QValueList<VCardLineX> *_vcdata; 416 Q3ValueList<VCardLineX> *_vcdata;
412 QValueList<QString> lines; 417 QStringList lines;
413 418
414 _vcdata = new QValueList<VCardLineX>; 419 _vcdata = new Q3ValueList<VCardLineX>;
415 420
416 lines = QStringList::split( QRegExp( "[\x0d\x0a]" ), vc ); 421 lines = QStringList::split( QRegExp( "[\x0d\x0a]" ), vc );
417 422
418 // for each line in the vCard 423 // for each line in the vCard
419 for ( QStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) { 424 for ( QStringList::Iterator j = lines.begin(); j != lines.end(); ++j ) {
420 VCardLineX _vcl; 425 VCardLineX _vcl;
421 426
422 // take spaces off the end - ugly but necessary hack 427 // take spaces off the end - ugly but necessary hack
423 for ( int g = (*j).length()-1; g > 0 && (*j)[g].isSpace(); --g ) 428 for ( int g = (*j).length()-1; g > 0 && (*j)[g].isSpace(); --g )
424 (*j)[g] = 0; 429 (*j)[g] = 0;
425 430
426 // first token: 431 // first token:
@@ -492,26 +497,26 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
492 do { 497 do {
493 value += *( ++j ); 498 value += *( ++j );
494 } while ( (*j).at( (*j).length() - 1 ) != '=' ); 499 } while ( (*j).at( (*j).length() - 1 ) != '=' );
495 } else { 500 } else {
496 if ( qp ) { // join any split lines 501 if ( qp ) { // join any split lines
497 while ( value.at( value.length() - 1 ) == '=' ) { 502 while ( value.at( value.length() - 1 ) == '=' ) {
498 value.remove( value.length() - 1, 1 ); 503 value.remove( value.length() - 1, 1 );
499 value.append(*( ++j )); 504 value.append(*( ++j ));
500 } 505 }
501 } 506 }
502 _vcl.parameters = QStringList::split( ';', value, true ); 507 _vcl.parameters = QStringList::split( ';', value, true );
503 if ( qp ) { // decode the quoted printable 508 if ( qp ) { // decode the quoted printable
504 for ( QStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) 509 for ( QLinkedList<QString>::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z )
505 *z = KCodecs::quotedPrintableDecode( (*z).latin1() ); 510 *z = KCodecs::quotedPrintableDecode( (Q3CString)(*z).latin1() );
506 } 511 }
507 } 512 }
508 } else { 513 } else {
509 _err = VC_ERR_INTERNAL; 514 _err = VC_ERR_INTERNAL;
510 break; 515 break;
511 } 516 }
512 517
513 // validate VCardLineX 518 // validate VCardLineX
514 if ( !_vcl.isValid() ) { 519 if ( !_vcl.isValid() ) {
515 _err = VC_ERR_INVALID_LINE; 520 _err = VC_ERR_INVALID_LINE;
516 break; 521 break;
517 } 522 }
@@ -534,74 +539,75 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
534 // if the vCard was valid. 539 // if the vCard was valid.
535 if ( err ) 540 if ( err )
536 *err = _err; 541 *err = _err;
537 542
538 if ( _err != 0 ) { 543 if ( _err != 0 ) {
539 delete _vcdata; 544 delete _vcdata;
540 return 0; 545 return 0;
541 } 546 }
542 547
543 return new VCard21ParserImpl( _vcdata ); 548 return new VCard21ParserImpl( _vcdata );
544} 549}
545 550
546VCard21ParserImpl::VCard21ParserImpl(QValueList<VCardLineX> *_vcd) : _vcdata(_vcd) 551VCard21ParserImpl::VCard21ParserImpl(Q3ValueList<VCardLineX> *_vcd) : _vcdata(_vcd)
547{ 552{
548} 553}
549 554
550 555
551QString VCard21ParserImpl::getValue(const QString& name, const QString& qualifier) 556QString VCard21ParserImpl::getValue(const QString& name, const QString& qualifier)
552{ 557{
553 QString failed; 558 QString failed;
554 const QString lowname = name.lower(); 559 const QString lowname = name.lower();
555 const QString lowqualifier = qualifier.lower(); 560 const QString lowqualifier = qualifier.lower();
556 561
557 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 562 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
558 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { 563 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) {
559 if ((*i).parameters.count() > 0) 564 if ((*i).parameters.count() > 0)
560 return (*i).parameters[0]; 565 return (*i).parameters[0];
561 else return failed; 566 else return failed;
562 } 567 }
563 } 568 }
564 return failed; 569 return failed;
565} 570}
566 571
567 572
568QString VCard21ParserImpl::getValue(const QString& name) 573QString VCard21ParserImpl::getValue(const QString& name)
569{ 574{
570 QString failed; 575 QString failed;
571 const QString lowname = name.lower(); 576 const QString lowname = name.lower();
572 577
573 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 578 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
574 if ((*i).name == lowname && !(*i).qualified) { 579 if ((*i).name == lowname && !(*i).qualified) {
575 if ((*i).parameters.count() > 0) 580 if ((*i).parameters.count() > 0)
576 return (*i).parameters[0]; 581 return (*i).parameters[0];
577 else return failed; 582 else return failed;
578 } 583 }
579 } 584 }
580 return failed; 585 return failed;
581} 586}
582 587
583 588
584QStringList VCard21ParserImpl::getValues(const QString& name) 589QStringList VCard21ParserImpl::getValues(const QString& name)
585{ 590{
586 const QString lowname = name.lower(); 591 const QString lowname = name.lower();
587 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 592 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
588 if ((*i).name == lowname && !(*i).qualified) 593 if ((*i).name == lowname && !(*i).qualified) {
589 return (*i).parameters; 594 return QStringList( (*i).parameters );
595 }
590 } 596 }
591 // failed. 597 // failed.
592 return QStringList(); 598 return QStringList();
593} 599}
594 600
595QStringList VCard21ParserImpl::getValues(const QString& name, const QString& qualifier) 601QStringList VCard21ParserImpl::getValues(const QString& name, const QString& qualifier)
596{ 602{
597 const QString lowname = name.lower(); 603 const QString lowname = name.lower();
598 const QString lowqualifier = qualifier.lower(); 604 const QString lowqualifier = qualifier.lower();
599 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 605 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
600 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) 606 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier))
601 return (*i).parameters; 607 return QStringList( (*i).parameters );
602 } 608 }
603 // failed. 609 // failed.
604 return QStringList(); 610 return QStringList();
605} 611}
606 612
607 613
diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h
index 77e69b6..80ba6ef 100644
--- a/kabc/vcard21parser.h
+++ b/kabc/vcard21parser.h
@@ -25,25 +25,25 @@ Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef KABC_VCARD21FORMAT_H 29#ifndef KABC_VCARD21FORMAT_H
30#define KABC_VCARD21FORMAT_H 30#define KABC_VCARD21FORMAT_H
31 31
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <kdebug.h> 33#include <kdebug.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qstring.h> 35#include <qstring.h>
36#include <kurl.h> 36#include <kurl.h>
37#include <qvaluelist.h> 37#include <q3valuelist.h>
38 38
39#include "addressee.h" 39#include "addressee.h"
40#include "addressbook.h" 40#include "addressbook.h"
41#include "phonenumber.h" 41#include "phonenumber.h"
42 42
43 43
44#define VCARD_BEGIN "begin:vcard" 44#define VCARD_BEGIN "begin:vcard"
45#define VCARD_END "end:vcard" 45#define VCARD_END "end:vcard"
46#define VCARD_BEGIN_N "begin" 46#define VCARD_BEGIN_N "begin"
47#define VCARD_END_N "end" 47#define VCARD_END_N "end"
48#define VCARD_VERSION "version" 48#define VCARD_VERSION "version"
49 49
@@ -187,40 +187,40 @@ public:
187}; 187};
188 188
189} 189}
190 190
191/** 191/**
192 * @short Helper class 192 * @short Helper class
193 */ 193 */
194class VCardLineX 194class VCardLineX
195{ 195{
196public: 196public:
197 QString name; 197 QString name;
198 bool qualified; 198 bool qualified;
199 QValueList<QString> qualifiers; 199 Q3ValueList<QString> qualifiers;
200 QValueList<QString> parameters; 200 Q3ValueList<QString> parameters;
201 bool isValid() const; 201 bool isValid() const;
202}; 202};
203 203
204/** 204/**
205 * @short Helper class 205 * @short Helper class
206 */ 206 */
207class VCard21ParserImpl 207class VCard21ParserImpl
208{ 208{
209 friend class VCardLineX; 209 friend class VCardLineX;
210 210
211public: 211public:
212 VCard21ParserImpl() { }; 212 VCard21ParserImpl() { };
213 virtual ~VCard21ParserImpl() { }; 213 virtual ~VCard21ParserImpl() { };
214 static VCard21ParserImpl *parseVCard(const QString& vc, int *err = NULL); 214 static VCard21ParserImpl *parseVCard(const QString& vc, int *err = NULL);
215 QString getValue(const QString& name, const QString& qualifier); 215 QString getValue(const QString& name, const QString& qualifier);
216 QString getValue(const QString& name); 216 QString getValue(const QString& name);
217 QStringList getValues(const QString& name, const QString& qualifier); 217 QStringList getValues(const QString& name, const QString& qualifier);
218 QStringList getValues(const QString& name); 218 QStringList getValues(const QString& name);
219 219
220 QValueList<VCardLineX> *_vcdata; 220 Q3ValueList<VCardLineX> *_vcdata;
221 221
222private: 222private:
223 VCard21ParserImpl (QValueList<VCardLineX> *_vcd); 223 VCard21ParserImpl (Q3ValueList<VCardLineX> *_vcd);
224}; 224};
225 225
226#endif 226#endif
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp
index 580c28b..2417874 100644
--- a/kabc/vcardformatimpl.cpp
+++ b/kabc/vcardformatimpl.cpp
@@ -19,24 +19,27 @@
19*/ 19*/
20 20
21/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <qfile.h> 28#include <qfile.h>
29#include <qregexp.h> 29#include <qregexp.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <Q3CString>
33#include <Q3PtrList>
31 34
32#include <kdebug.h> 35#include <kdebug.h>
33#include <kmdcodec.h> 36#include <kmdcodec.h>
34#include <kstandarddirs.h> 37#include <kstandarddirs.h>
35#include <ktempfile.h> 38#include <ktempfile.h>
36 39
37#include <VCard.h> 40#include <VCard.h>
38 41
39#include "addressbook.h" 42#include "addressbook.h"
40#include "vcardformatimpl.h" 43#include "vcardformatimpl.h"
41 44
42using namespace KABC; 45using namespace KABC;
@@ -45,46 +48,46 @@ using namespace VCARD;
45int VCardFormatImpl::debug = -1; 48int VCardFormatImpl::debug = -1;
46 49
47VCardFormatImpl::VCardFormatImpl() 50VCardFormatImpl::VCardFormatImpl()
48{ 51{
49 debug = (getenv("KABC_DEBUG") != 0); 52 debug = (getenv("KABC_DEBUG") != 0);
50} 53}
51 54
52bool VCardFormatImpl::load( Addressee &addressee, QFile *file ) 55bool VCardFormatImpl::load( Addressee &addressee, QFile *file )
53{ 56{
54 kdDebug(5700) << "VCardFormat::load()" << endl; 57 kdDebug(5700) << "VCardFormat::load()" << endl;
55 58
56 QByteArray fdata = file->readAll(); 59 QByteArray fdata = file->readAll();
57 QCString data(fdata.data(), fdata.size()+1); 60 Q3CString data(fdata.data(), fdata.size()+1);
58 61
59 VCardEntity e( data ); 62 VCardEntity e( data );
60 63
61 VCardListIterator it( e.cardList() ); 64 VCardListIterator it( e.cardList() );
62 65
63 if ( it.current() ) { 66 if ( it.current() ) {
64//US VCard v(*it.current()); 67//US VCard v(*it.current());
65//US loadAddressee( addressee, v ); 68//US loadAddressee( addressee, v );
66 loadAddressee( addressee, it.current() ); 69 loadAddressee( addressee, it.current() );
67 return true; 70 return true;
68 } 71 }
69 72
70 return false; 73 return false;
71} 74}
72 75
73 76
74#include <kmessagebox.h> 77#include <kmessagebox.h>
75bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFile *file ) 78bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFile *file )
76{ 79{
77 80
78 QCString data(file->readAll().data(), file->size()+1); 81 Q3CString data(file->readAll().data(), file->size()+1);
79 VCardEntity e( data ); 82 VCardEntity e( data );
80 83
81 VCardListIterator it( e.cardList() ); 84 VCardListIterator it( e.cardList() );
82 85
83 for (; it.current(); ++it) { 86 for (; it.current(); ++it) {
84//US VCard v(*it.current()); 87//US VCard v(*it.current());
85 Addressee addressee; 88 Addressee addressee;
86//US loadAddressee( addressee, v ); 89//US loadAddressee( addressee, v );
87 loadAddressee( addressee, it.current() ); 90 loadAddressee( addressee, it.current() );
88 addressee.setResource( resource ); 91 addressee.setResource( resource );
89 addressBook->insertAddressee( addressee ); 92 addressBook->insertAddressee( addressee );
90 if (debug == true) 93 if (debug == true)
@@ -99,50 +102,50 @@ void VCardFormatImpl::save( const Addressee &addressee, QFile *file )
99{ 102{
100 VCardEntity vcards; 103 VCardEntity vcards;
101 VCardList vcardlist; 104 VCardList vcardlist;
102 vcardlist.setAutoDelete( true ); 105 vcardlist.setAutoDelete( true );
103 106
104 VCard *v = new VCard; 107 VCard *v = new VCard;
105 108
106 saveAddressee( addressee, v, false ); 109 saveAddressee( addressee, v, false );
107 110
108 vcardlist.append( v ); 111 vcardlist.append( v );
109 vcards.setCardList( vcardlist ); 112 vcards.setCardList( vcardlist );
110 113
111 QCString vcardData = vcards.asString(); 114 Q3CString vcardData = vcards.asString();
112 file->writeBlock( (const char*)vcardData, vcardData.length() ); 115 file->writeBlock( (const char*)vcardData, vcardData.length() );
113} 116}
114 117
115void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, QFile *file ) 118void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, QFile *file )
116{ 119{
117 120
118 AddressBook::Iterator it; 121 AddressBook::Iterator it;
119 for ( it = ab->begin(); it != ab->end(); ++it ) { 122 for ( it = ab->begin(); it != ab->end(); ++it ) {
120 if ( (*it).resource() == resource ) { 123 if ( (*it).resource() == resource ) {
121 save((*it),file); 124 save((*it),file);
122 qApp->processEvents(); 125 qApp->processEvents();
123 (*it).setChanged( false ); 126 (*it).setChanged( false );
124 } 127 }
125 } 128 }
126 // for memory usage status test only 129 // for memory usage status test only
127 // KMessageBox::information ( 0, "Stoppppp", QString("Stop ") ); 130 // KMessageBox::information ( 0, "Stoppppp", QString("Stop ") );
128} 131}
129 132
130bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) 133bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v )
131{ 134{
132 QPtrList<ContentLine> contentLines = v->contentLineList(); 135 Q3PtrList<ContentLine> contentLines = v->contentLineList();
133 ContentLine *cl; 136 ContentLine *cl;
134 137
135 for( cl = contentLines.first(); cl; cl = contentLines.next() ) { 138 for( cl = contentLines.first(); cl; cl = contentLines.next() ) {
136 QCString n = cl->name(); 139 Q3CString n = cl->name();
137 if ( n.left( 2 ) == "X-" ) { 140 if ( n.left( 2 ) == "X-" ) {
138 n = n.mid( 2 ); 141 n = n.mid( 2 );
139 int posDash = n.find( "-" ); 142 int posDash = n.find( "-" );
140 addressee.insertCustom( QString::fromUtf8( n.left( posDash ) ), 143 addressee.insertCustom( QString::fromUtf8( n.left( posDash ) ),
141 QString::fromUtf8( n.mid( posDash + 1 ) ), 144 QString::fromUtf8( n.mid( posDash + 1 ) ),
142 QString::fromUtf8( cl->value()->asString() ) ); 145 QString::fromUtf8( cl->value()->asString() ) );
143 continue; 146 continue;
144 } 147 }
145 148
146 EntityType type = cl->entityType(); 149 EntityType type = cl->entityType();
147 switch( type ) { 150 switch( type ) {
148 151
@@ -210,25 +213,25 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v )
210 addressee.insertAddress( readAddressValue( cl ) ); 213 addressee.insertAddress( readAddressValue( cl ) );
211 break; 214 break;
212 215
213 case EntityTelephone: 216 case EntityTelephone:
214 addressee.insertPhoneNumber( readTelephoneValue( cl ) ); 217 addressee.insertPhoneNumber( readTelephoneValue( cl ) );
215 break; 218 break;
216 219
217 case EntityCategories: 220 case EntityCategories:
218 addressee.setCategories( QStringList::split( ",", readTextValue( cl ) ) ); 221 addressee.setCategories( QStringList::split( ",", readTextValue( cl ) ) );
219 break; 222 break;
220 223
221 case EntityBirthday: 224 case EntityBirthday:
222 addressee.setBirthday( readDateValue( cl ) ); 225 addressee.setBirthday( (QDateTime) readDateValue( cl ) );
223 break; 226 break;
224 227
225 case EntityRevision: 228 case EntityRevision:
226 addressee.setRevision( readDateTimeValue( cl ) ); 229 addressee.setRevision( readDateTimeValue( cl ) );
227 break; 230 break;
228 231
229 case EntityGeo: 232 case EntityGeo:
230 addressee.setGeo( readGeoValue( cl ) ); 233 addressee.setGeo( readGeoValue( cl ) );
231 break; 234 break;
232 235
233 case EntityTimeZone: 236 case EntityTimeZone:
234 addressee.setTimeZone( readUTCValue( cl ) ); 237 addressee.setTimeZone( readUTCValue( cl ) );
@@ -521,25 +524,25 @@ Address VCardFormatImpl::readAddressValue( ContentLine *cl )
521 a.setCountry( QString::fromUtf8( v->countryName() ) ); 524 a.setCountry( QString::fromUtf8( v->countryName() ) );
522 525
523 a.setType( readAddressParam( cl ) ); 526 a.setType( readAddressParam( cl ) );
524 527
525 return a; 528 return a;
526} 529}
527 530
528int VCardFormatImpl::readAddressParam( ContentLine *cl ) 531int VCardFormatImpl::readAddressParam( ContentLine *cl )
529{ 532{
530 int type = 0; 533 int type = 0;
531 ParamList params = cl->paramList(); 534 ParamList params = cl->paramList();
532 ParamListIterator it( params ); 535 ParamListIterator it( params );
533 QCString tmpStr; 536 Q3CString tmpStr;
534 for( ; it.current(); ++it ) { 537 for( ; it.current(); ++it ) {
535 if ( (*it)->name().upper() == "TYPE" ) { 538 if ( (*it)->name().upper() == "TYPE" ) {
536 tmpStr = (*it)->value().lower(); 539 tmpStr = (*it)->value().lower();
537 if ( tmpStr == "dom" ) type |= Address::Dom; 540 if ( tmpStr == "dom" ) type |= Address::Dom;
538 else if ( tmpStr == "intl" ) type |= Address::Intl; 541 else if ( tmpStr == "intl" ) type |= Address::Intl;
539 else if ( tmpStr == "parcel" ) type |= Address::Parcel; 542 else if ( tmpStr == "parcel" ) type |= Address::Parcel;
540 else if ( tmpStr == "postal" ) type |= Address::Postal; 543 else if ( tmpStr == "postal" ) type |= Address::Postal;
541 else if ( tmpStr == "work" ) type |= Address::Work; 544 else if ( tmpStr == "work" ) type |= Address::Work;
542 else if ( tmpStr == "home" ) type |= Address::Home; 545 else if ( tmpStr == "home" ) type |= Address::Home;
543 else if ( tmpStr == "pref" ) type |= Address::Pref; 546 else if ( tmpStr == "pref" ) type |= Address::Pref;
544 } 547 }
545 } 548 }
@@ -600,25 +603,25 @@ void VCardFormatImpl::addTelephoneValue( VCard *v, const PhoneNumber &p )
600 v->add(cl); 603 v->add(cl);
601} 604}
602 605
603PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) 606PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl )
604{ 607{
605 PhoneNumber p; 608 PhoneNumber p;
606 TelValue *value = (TelValue *)cl->value(); 609 TelValue *value = (TelValue *)cl->value();
607 p.setNumber( QString::fromUtf8( value->asString() ) ); 610 p.setNumber( QString::fromUtf8( value->asString() ) );
608 611
609 int type = 0; 612 int type = 0;
610 ParamList params = cl->paramList(); 613 ParamList params = cl->paramList();
611 ParamListIterator it( params ); 614 ParamListIterator it( params );
612 QCString tmpStr; 615 Q3CString tmpStr;
613 for( ; it.current(); ++it ) { 616 for( ; it.current(); ++it ) {
614 if ( (*it)->name() == "TYPE" ) { 617 if ( (*it)->name() == "TYPE" ) {
615 tmpStr = (*it)->value().lower(); 618 tmpStr = (*it)->value().lower();
616 if ( tmpStr == "home" ) type |= PhoneNumber::Home; 619 if ( tmpStr == "home" ) type |= PhoneNumber::Home;
617 else if ( tmpStr == "work" ) type |= PhoneNumber::Work; 620 else if ( tmpStr == "work" ) type |= PhoneNumber::Work;
618 else if ( tmpStr == "msg" ) type |= PhoneNumber::Msg; 621 else if ( tmpStr == "msg" ) type |= PhoneNumber::Msg;
619 else if ( tmpStr == "pref" ) type |= PhoneNumber::Pref; 622 else if ( tmpStr == "pref" ) type |= PhoneNumber::Pref;
620 else if ( tmpStr == "voice" ) type |= PhoneNumber::Voice; 623 else if ( tmpStr == "voice" ) type |= PhoneNumber::Voice;
621 else if ( tmpStr == "fax" ) type |= PhoneNumber::Fax; 624 else if ( tmpStr == "fax" ) type |= PhoneNumber::Fax;
622 else if ( tmpStr == "cell" ) type |= PhoneNumber::Cell; 625 else if ( tmpStr == "cell" ) type |= PhoneNumber::Cell;
623 else if ( tmpStr == "video" ) type |= PhoneNumber::Video; 626 else if ( tmpStr == "video" ) type |= PhoneNumber::Video;
624 else if ( tmpStr == "bbs" ) type |= PhoneNumber::Bbs; 627 else if ( tmpStr == "bbs" ) type |= PhoneNumber::Bbs;
@@ -861,25 +864,25 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty
861 // qDebug( "IIIMMMMM %s",QImage::outputFormatList ().join("-").latin1() ); 864 // qDebug( "IIIMMMMM %s",QImage::outputFormatList ().join("-").latin1() );
862 if ( pic.isIntern() && pic.data().isNull() ) 865 if ( pic.isIntern() && pic.data().isNull() )
863 return; 866 return;
864 867
865 if ( !pic.isIntern() && pic.url().isEmpty() ) 868 if ( !pic.isIntern() && pic.url().isEmpty() )
866 return; 869 return;
867 870
868 ParamList params; 871 ParamList params;
869 if ( pic.isIntern() ) { 872 if ( pic.isIntern() ) {
870 QImage img = pic.data(); 873 QImage img = pic.data();
871 if ( intern ) { // only for vCard export we really write the data inline 874 if ( intern ) { // only for vCard export we really write the data inline
872 QByteArray data; 875 QByteArray data;
873 QDataStream s( data, IO_WriteOnly ); 876 QDataStream s( &data, QIODevice::WriteOnly );
874 s.setVersion( 4 ); // to produce valid png files 877 s.setVersion( 4 ); // to produce valid png files
875 s << img; 878 s << img;
876 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); 879 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) );
877 params.append( new Param( "ENCODING", "b" ) ); 880 params.append( new Param( "ENCODING", "b" ) );
878 if ( !pic.type().isEmpty() ) 881 if ( !pic.type().isEmpty() )
879 params.append( new Param( "TYPE", pic.type().utf8() ) ); 882 params.append( new Param( "TYPE", pic.type().utf8() ) );
880 } else { // save picture in cache 883 } else { // save picture in cache
881 QString dir; 884 QString dir;
882 if ( type == EntityPhoto ) 885 if ( type == EntityPhoto )
883 dir = "photos"; 886 dir = "photos";
884 if ( type == EntityLogo ) 887 if ( type == EntityLogo )
885 dir = "logos"; 888 dir = "logos";
@@ -950,25 +953,25 @@ void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, co
950 return; 953 return;
951 954
952 if ( !sound.isIntern() && sound.url().isEmpty() ) 955 if ( !sound.isIntern() && sound.url().isEmpty() )
953 return; 956 return;
954 957
955 ParamList params; 958 ParamList params;
956 if ( sound.isIntern() ) { 959 if ( sound.isIntern() ) {
957 QByteArray data = sound.data(); 960 QByteArray data = sound.data();
958 if ( intern ) { // only for vCard export we really write the data inline 961 if ( intern ) { // only for vCard export we really write the data inline
959 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); 962 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) );
960 } else { // save sound in cache 963 } else { // save sound in cache
961 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); 964 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
962 if ( file.open( IO_WriteOnly ) ) { 965 if ( file.open( QIODevice::WriteOnly ) ) {
963 file.writeBlock( data ); 966 file.writeBlock( data );
964 } 967 }
965 cl.setValue( new TextValue( "<dummy>" ) ); 968 cl.setValue( new TextValue( "<dummy>" ) );
966 } 969 }
967 params.append( new Param( "ENCODING", "b" ) ); 970 params.append( new Param( "ENCODING", "b" ) );
968 } else { 971 } else {
969 cl.setValue( new TextValue( sound.url().utf8() ) ); 972 cl.setValue( new TextValue( sound.url().utf8() ) );
970 params.append( new Param( "VALUE", "uri" ) ); 973 params.append( new Param( "VALUE", "uri" ) );
971 } 974 }
972 975
973 cl.setParamList( params ); 976 cl.setParamList( params );
974 vcard->add( cl ); 977 vcard->add( cl );
@@ -982,25 +985,25 @@ Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &
982 985
983 ParamList params = cl->paramList(); 986 ParamList params = cl->paramList();
984 ParamListIterator it( params ); 987 ParamListIterator it( params );
985 for( ; it.current(); ++it ) { 988 for( ; it.current(); ++it ) {
986 if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" ) 989 if ( (*it)->name() == "ENCODING" && (*it)->value() == "b" )
987 isInline = true; 990 isInline = true;
988 } 991 }
989 992
990 if ( isInline ) { 993 if ( isInline ) {
991 QByteArray data; 994 QByteArray data;
992 if ( v->asString() == "<dummy>" ) { // no sound inline stored => sound is in cache 995 if ( v->asString() == "<dummy>" ) { // no sound inline stored => sound is in cache
993 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); 996 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
994 if ( file.open( IO_ReadOnly ) ) { 997 if ( file.open( QIODevice::ReadOnly ) ) {
995 data = file.readAll(); 998 data = file.readAll();
996 file.close(); 999 file.close();
997 } 1000 }
998 } else { 1001 } else {
999 KCodecs::base64Decode( v->asString(), data ); 1002 KCodecs::base64Decode( v->asString(), data );
1000 } 1003 }
1001 sound.setData( data ); 1004 sound.setData( data );
1002 } else { 1005 } else {
1003 sound.setUrl( QString::fromUtf8( v->asString() ) ); 1006 sound.setUrl( QString::fromUtf8( v->asString() ) );
1004 } 1007 }
1005 1008
1006 return sound; 1009 return sound;
diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp
index 8db8c11..0b97a08 100644
--- a/kabc/vcardformatplugin.cpp
+++ b/kabc/vcardformatplugin.cpp
@@ -52,19 +52,19 @@ void VCardFormatPlugin::save( const Addressee &addressee, QFile *file )
52} 52}
53 53
54void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file ) 54void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file )
55{ 55{
56 qDebug("VCardFormatPlugin::saveAll"); 56 qDebug("VCardFormatPlugin::saveAll");
57 mImpl->saveAll( addressBook, resource, file ); 57 mImpl->saveAll( addressBook, resource, file );
58} 58}
59 59
60bool VCardFormatPlugin::checkFormat( QFile *file ) const 60bool VCardFormatPlugin::checkFormat( QFile *file ) const
61{ 61{
62 QString line; 62 QString line;
63 63
64 file->readLine( line, 1024 ); 64 char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp;
65 line = line.stripWhiteSpace(); 65 line = line.stripWhiteSpace();
66 if ( line == "BEGIN:VCARD" ) 66 if ( line == "BEGIN:VCARD" )
67 return true; 67 return true;
68 else 68 else
69 return false; 69 return false;
70} 70}
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
@@ -15,32 +15,32 @@
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#ifndef VCARDPARSER_VCARD_H 21#ifndef VCARDPARSER_VCARD_H
22#define VCARDPARSER_VCARD_H 22#define VCARDPARSER_VCARD_H
23 23
24#include "vcardline.h" 24#include "vcardline.h"
25#include <qmap.h> 25#include <qmap.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27#include <qvaluelist.h> 27#include <q3valuelist.h>
28 28
29namespace KABC { 29namespace KABC {
30 30
31class VCard 31class VCard
32{ 32{
33 public: 33 public:
34 typedef QValueList<VCard> List; 34 typedef Q3ValueList<VCard> List;
35 typedef QMap< QString, VCardLine::List > LineMap; 35 typedef QMap< QString, VCardLine::List > LineMap;
36 36
37 enum Version { v2_1, v3_0 }; 37 enum Version { v2_1, v3_0 };
38 38
39 VCard(); 39 VCard();
40 VCard( const VCard& ); 40 VCard( const VCard& );
41 41
42 ~VCard(); 42 ~VCard();
43 43
44 VCard& operator=( const VCard& ); 44 VCard& operator=( const VCard& );
45 45
46 /** 46 /**
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
@@ -10,49 +10,51 @@
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include "vcardline.h" 21#include "vcardline.h"
22//Added by qt3to4:
23#include <Q3CString>
22 24
23using namespace KABC; 25using namespace KABC;
24 26
25class VCardLine::VCardLinePrivate 27class VCardLine::VCardLinePrivate
26{ 28{
27 public: 29 public:
28 QString mGroup; 30 QString mGroup;
29}; 31};
30 32
31VCardLine::VCardLine() 33VCardLine::VCardLine()
32 : d( 0 ) 34 : d( 0 )
33{ 35{
34} 36}
35 37
36VCardLine::VCardLine( const QString &identifier ) 38VCardLine::VCardLine( const QString &identifier )
37 : d( 0 ) 39 : d( 0 )
38{ 40{
39 mIdentifier = identifier; 41 mIdentifier = identifier;
40} 42}
41 43
42VCardLine::VCardLine( const QString &identifier, const QString &value ) 44VCardLine::VCardLine( const QString &identifier, const QString &value )
43 : d( 0 ) 45 : d( 0 )
44{ 46{
45 mIdentifier = identifier; 47 mIdentifier = identifier;
46 mValue.assign( value.data(), value.length() ); 48 mValue = value;
47} 49}
48 50
49VCardLine::VCardLine( const VCardLine& line ) 51VCardLine::VCardLine( const VCardLine& line )
50 : d( 0 ) 52 : d( 0 )
51{ 53{
52 mParamMap = line.mParamMap; 54 mParamMap = line.mParamMap;
53 mValue = line.mValue; 55 mValue = line.mValue;
54 mIdentifier = line.mIdentifier; 56 mIdentifier = line.mIdentifier;
55} 57}
56 58
57VCardLine::~VCardLine() 59VCardLine::~VCardLine()
58{ 60{
@@ -77,25 +79,25 @@ void VCardLine::setIdentifier( const QString& identifier )
77 mIdentifier = identifier; 79 mIdentifier = identifier;
78} 80}
79 81
80QString VCardLine::identifier() const 82QString VCardLine::identifier() const
81{ 83{
82 return mIdentifier; 84 return mIdentifier;
83} 85}
84 86
85void VCardLine::setValueString( const QString& value ) 87void VCardLine::setValueString( const QString& value )
86{ 88{
87 setValueCString( value.utf8() ); 89 setValueCString( value.utf8() );
88} 90}
89void VCardLine::setValueCString( const QCString& value ) 91void VCardLine::setValueCString( const Q3CString& value )
90{ 92{
91 mValue.duplicate( value.data(), value.length() ); 93 mValue.duplicate( value.data(), value.length() );
92} 94}
93 95
94void VCardLine::setValueBytes( const QByteArray& value ) 96void VCardLine::setValueBytes( const QByteArray& value )
95{ 97{
96 mValue = value; 98 mValue = value;
97} 99}
98 100
99QString VCardLine::valueString() const 101QString VCardLine::valueString() const
100{ 102{
101 return QString::fromUtf8( mValue.data(), mValue.size() ); 103 return QString::fromUtf8( mValue.data(), mValue.size() );
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
@@ -13,36 +13,36 @@
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#ifndef VCARDLINE_H 21#ifndef VCARDLINE_H
22#define VCARDLINE_H 22#define VCARDLINE_H
23 23
24#include <qstringlist.h> 24#include <qstringlist.h>
25#include <qvaluelist.h> 25#include <q3valuelist.h>
26#include <qcstring.h> 26#include <q3cstring.h>
27#include <qvariant.h> 27#include <qvariant.h>
28#include <qmap.h> 28#include <qmap.h>
29#include <qstring.h> 29#include <qstring.h>
30 30
31namespace KABC { 31namespace KABC {
32 32
33class VCardLine 33class VCardLine
34{ 34{
35 public: 35 public:
36 typedef QValueList<VCardLine> List; 36 typedef Q3ValueList<VCardLine> List;
37 typedef QMap<QString, QStringList> ParamMap; 37 typedef QMap<QString, QStringList> ParamMap;
38 38
39 VCardLine(); 39 VCardLine();
40 VCardLine( const QString &identifier ); 40 VCardLine( const QString &identifier );
41 VCardLine( const QString &identifier, const QString &value ); 41 VCardLine( const QString &identifier, const QString &value );
42 VCardLine( const VCardLine& ); 42 VCardLine( const VCardLine& );
43 43
44 ~VCardLine(); 44 ~VCardLine();
45 45
46 VCardLine& operator=( const VCardLine& ); 46 VCardLine& operator=( const VCardLine& );
47 47
48 /** 48 /**
@@ -50,25 +50,25 @@ class VCardLine
50 */ 50 */
51 void setIdentifier( const QString& identifier ); 51 void setIdentifier( const QString& identifier );
52 52
53 /** 53 /**
54 * Returns the identifier of this line. 54 * Returns the identifier of this line.
55 */ 55 */
56 QString identifier() const; 56 QString identifier() const;
57 57
58 /** 58 /**
59 * Sets the value of of this line. 59 * Sets the value of of this line.
60 */ 60 */
61 void setValueString( const QString& value ); 61 void setValueString( const QString& value );
62 void setValueCString( const QCString& value ); 62 void setValueCString( const Q3CString& value );
63 void setValueBytes( const QByteArray& value ); 63 void setValueBytes( const QByteArray& value );
64 64
65 /** 65 /**
66 * Returns the value of this line. 66 * Returns the value of this line.
67 */ 67 */
68 QString valueString() const; 68 QString valueString() const;
69 QByteArray valueBytes() const; 69 QByteArray valueBytes() const;
70 70
71 /** 71 /**
72 * Sets the group the line belongs to. 72 * Sets the group the line belongs to.
73 */ 73 */
74 void setGroup( const QString& group ); 74 void setGroup( const QString& group );
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
@@ -209,25 +209,25 @@ QString VCardParser::createVCards( const VCard::List& list )
209 if ( !(*valueIt).isEmpty() ) 209 if ( !(*valueIt).isEmpty() )
210 textLine.append( "=" + (*valueIt) ); 210 textLine.append( "=" + (*valueIt) );
211 } 211 }
212 } 212 }
213 } 213 }
214 214
215 if ( hasEncoding ) { // have to encode the data 215 if ( hasEncoding ) { // have to encode the data
216 QByteArray input, output; 216 QByteArray input, output;
217 input = (*lineIt).valueBytes(); 217 input = (*lineIt).valueBytes();
218 if ( encodingType == "b" ) 218 if ( encodingType == "b" )
219 KCodecs::base64Encode( input, output ); 219 KCodecs::base64Encode( input, output );
220 else if ( encodingType == "quoted-printable" ) 220 else if ( encodingType == "quoted-printable" )
221 KCodecs::quotedPrintableEncode( input, output ); 221 KCodecs::quotedPrintableEncode( input, output, true );
222 textLine.append( ":" + QString( output ) ); 222 textLine.append( ":" + QString( output ) );
223 } else 223 } else
224 textLine.append( ":" + (*lineIt).valueString().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 )
228 text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" ); 228 text.append( ( i == 0 ? "" : " " ) + textLine.mid( i * FOLD_WIDTH, FOLD_WIDTH ) + "\r\n" );
229 } else 229 } else
230 text.append( textLine + "\r\n" ); 230 text.append( textLine + "\r\n" );
231 } 231 }
232 } 232 }
233 } 233 }
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
@@ -643,25 +643,25 @@ Picture VCardTool::parsePicture( const VCardLine &line )
643 pic.setType( line.parameter( "type" ) ); 643 pic.setType( line.parameter( "type" ) );
644 644
645 return pic; 645 return pic;
646} 646}
647 647
648VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pic ) 648VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pic )
649{ 649{
650 VCardLine line( identifier ); 650 VCardLine line( identifier );
651 651
652 if ( pic.isIntern() ) { 652 if ( pic.isIntern() ) {
653 if ( !pic.data().isNull() ) { 653 if ( !pic.data().isNull() ) {
654 QByteArray input; 654 QByteArray input;
655 QDataStream s( input, IO_WriteOnly ); 655 QDataStream s( &input, QIODevice::WriteOnly );
656 s.setVersion( 4 ); 656 s.setVersion( 4 );
657 s << pic.data(); 657 s << pic.data();
658 line.setValueBytes( input ); 658 line.setValueBytes( input );
659 line.addParameter( "encoding", "b" ); 659 line.addParameter( "encoding", "b" );
660 line.addParameter( "type", "image/png" ); 660 line.addParameter( "type", "image/png" );
661 } 661 }
662 } else if ( !pic.url().isEmpty() ) { 662 } else if ( !pic.url().isEmpty() ) {
663 QByteArray ba; 663 QByteArray ba;
664 line.setValueString( pic.url() ); 664 line.setValueString( pic.url() );
665 line.addParameter( "value", "URI" ); 665 line.addParameter( "value", "URI" );
666 } 666 }
667 667