-rw-r--r-- | kabc/addressbook.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index fe59fcb..c700897 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -39,4 +39,4 @@ $Id$ */ -#include <qptrlist.h> -#include <qtextstream.h> +#include <q3ptrlist.h> +#include <q3textstream.h> #include <qfile.h> @@ -246,3 +246,3 @@ void AddressBook::init(const QString &config, const QString &family ) QString fami = family; - if (config != 0) { + if (!config.isEmpty()) { if ( family == "syncContact" ) { @@ -383,3 +383,3 @@ void AddressBook::export2File( QString fileName, QString resourceName ) QFile outFile( fileName ); - if ( !outFile.open( IO_WriteOnly ) ) { + if ( !outFile.open( QIODevice::WriteOnly ) ) { QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); @@ -388,4 +388,4 @@ void AddressBook::export2File( QString fileName, QString resourceName ) } - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); Iterator it; @@ -470,6 +470,6 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName ) QFile outFile(fileName); - if ( outFile.open(IO_WriteOnly) ) { + if ( outFile.open(QIODevice::WriteOnly) ) { datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); - QTextStream t( &outFile ); // use a text stream - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); // use a text stream + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t <<datastream; @@ -492,3 +492,3 @@ int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool remo QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); @@ -636,3 +636,3 @@ void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); @@ -1220,5 +1220,5 @@ void AddressBook::removeResources() //remove all possible resources. This should cleanup the configfile. - QPtrList<KABC::Resource> mResources = resources(); + Q3PtrList<KABC::Resource> mResources = resources(); - QPtrListIterator<KABC::Resource> it(mResources); + Q3PtrListIterator<KABC::Resource> it(mResources); for ( ; it.current(); ++it ) { @@ -1242,5 +1242,5 @@ bool AddressBook::removeResource( Resource *resource ) -QPtrList<Resource> AddressBook::resources() +Q3PtrList<Resource> AddressBook::resources() { - QPtrList<Resource> list; + Q3PtrList<Resource> list; |