-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 @@ -38,6 +38,6 @@ $Id$ #include "errorhandler.h" */ -#include <qptrlist.h> -#include <qtextstream.h> +#include <q3ptrlist.h> +#include <q3textstream.h> #include <qfile.h> #include <qregexp.h> @@ -245,5 +245,5 @@ void AddressBook::init(const QString &config, const QString &family ) d = new AddressBookData; QString fami = family; - if (config != 0) { + if (!config.isEmpty()) { if ( family == "syncContact" ) { qDebug("creating sync config "); @@ -382,11 +382,11 @@ 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>" ); KMessageBox::error( 0, text.arg( fileName ) ); return ; } - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); Iterator it; KABC::VCardConverter::Version version; @@ -469,8 +469,8 @@ 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; t << "\r\n\r\n"; @@ -491,5 +491,5 @@ int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool remo KABC::Addressee::List list; QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); file.close(); @@ -635,5 +635,5 @@ void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) KABC::Addressee::List list; QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); file.close(); @@ -1219,7 +1219,7 @@ 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 ) { KABC::Resource *res = it.current(); @@ -1241,7 +1241,7 @@ bool AddressBook::removeResource( Resource *resource ) } -QPtrList<Resource> AddressBook::resources() +Q3PtrList<Resource> AddressBook::resources() { - QPtrList<Resource> list; + Q3PtrList<Resource> list; // qDebug("AddressBook::resources() 1"); |