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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 592d78d..c584c35 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -248,65 +248,65 @@ void AddressBook::init(const QString &config, const QString &family )
if ( family == "syncContact" ) {
qDebug("creating sync config ");
fami = "contact";
KConfig* con = new KConfig( locateLocal("config", "syncContactrc") );
con->setGroup( "General" );
con->writeEntry( "ResourceKeys", QString("sync") );
con->writeEntry( "Standard", QString("sync") );
con->setGroup( "Resource_sync" );
con->writeEntry( "FileName", config );
con->writeEntry( "FileFormat", QString("vcard") );
con->writeEntry( "ResourceIdentifier", QString("sync") );
con->writeEntry( "ResourceName", QString("sync_res") );
if ( config.right(4) == ".xml" )
con->writeEntry( "ResourceType", QString("qtopia") );
else if ( config == "sharp" ) {
con->writeEntry( "ResourceType", QString("sharp") );
} else {
con->writeEntry( "ResourceType", QString("file") );
}
//con->sync();
d->mConfig = con;
}
else
d->mConfig = new KConfig( locateLocal("config", config) );
// qDebug("AddressBook::init 1 config=%s",config.latin1() );
}
else {
d->mConfig = 0;
// qDebug("AddressBook::init 1 config=0");
}
//US d->mErrorHandler = 0;
- d->mManager = new KRES::Manager<Resource>( fami, false );
+ d->mManager = new KRES::Manager<Resource>( fami );
d->mManager->readConfig( d->mConfig );
if ( family == "syncContact" ) {
KRES::Manager<Resource> *manager = d->mManager;
KRES::Manager<Resource>::ActiveIterator it;
for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
(*it)->setAddressBook( this );
if ( !(*it)->open() )
error( QString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) );
}
Resource *res = standardResource();
if ( !res ) {
qDebug("ERROR: no standard resource");
res = manager->createResource( "file" );
if ( res )
{
addResource( res );
}
else
qDebug(" No resource available!!!");
}
setStandardResource( res );
manager->writeConfig();
}
addCustomField( i18n( "Department" ), KABC::Field::Organization,
"X-Department", "KADDRESSBOOK" );
addCustomField( i18n( "Profession" ), KABC::Field::Organization,
"X-Profession", "KADDRESSBOOK" );
addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
"X-AssistantsName", "KADDRESSBOOK" );
addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
"X-ManagersName", "KADDRESSBOOK" );
addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,