author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/addressbook.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/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; |