summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp30
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
@@ -37,8 +37,8 @@ $Id$
#include "errorhandler.h"
*/
-#include <qptrlist.h>
-#include <qtextstream.h>
+#include <q3ptrlist.h>
+#include <q3textstream.h>
#include <qfile.h>
#include <qregexp.h>
@@ -244,7 +244,7 @@ void AddressBook::init(const QString &config, const QString &family )
blockLSEchange = false;
d = new AddressBookData;
QString fami = family;
- if (config != 0) {
+ if (!config.isEmpty()) {
if ( family == "syncContact" ) {
qDebug("creating sync config ");
fami = "contact";
@@ -381,13 +381,13 @@ 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;
version = KABC::VCardConverter::v3_0;
@@ -468,10 +468,10 @@ 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";
outFile.close();
@@ -490,7 +490,7 @@ int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool remo
setUntagged( true, resource );
KABC::Addressee::List list;
QFile file( fileName );
- file.open( IO_ReadOnly );
+ file.open( QIODevice::ReadOnly );
QByteArray rawData = file.readAll();
file.close();
QString data;
@@ -634,7 +634,7 @@ void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice )
setUntagged();
KABC::Addressee::List list;
QFile file( fileName );
- file.open( IO_ReadOnly );
+ file.open( QIODevice::ReadOnly );
QByteArray rawData = file.readAll();
file.close();
QString data;
@@ -1218,9 +1218,9 @@ bool AddressBook::addResource( Resource *resource )
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();
removeResource(res);
@@ -1240,9 +1240,9 @@ bool AddressBook::removeResource( Resource *resource )
return true;
}
-QPtrList<Resource> AddressBook::resources()
+Q3PtrList<Resource> AddressBook::resources()
{
- QPtrList<Resource> list;
+ Q3PtrList<Resource> list;
// qDebug("AddressBook::resources() 1");