Diffstat (limited to 'kabc/plugins/opie/resourceopie.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp index 3b2a6b7..a7d271f 100644 --- a/kabc/plugins/opie/resourceopie.cpp +++ b/kabc/plugins/opie/resourceopie.cpp @@ -97,7 +97,7 @@ void ResourceOpie::init( const QString &fileName ) connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); */ //US opie addressbook is always readonly - setReadOnly( true ); +//US setReadOnly( true ); setFileName( fileName ); @@ -112,7 +112,7 @@ ResourceOpie::~ResourceOpie() void ResourceOpie::writeConfig( KConfig *config ) { //US opie addressbook is always readonly - setReadOnly( true ); +//US setReadOnly( true ); Resource::writeConfig( config ); @@ -194,13 +194,23 @@ bool ResourceOpie::load() access -> setReadAhead( 32 ); // Use ReadAhead-Cache if available + bool res = false; if (mConverter == 0) + { mConverter = new OpieConverter(); + res = mConverter->init(); + if ( !res ) + { + qDebug("Unable to initialize opie converter. Most likely a problem with the category file"); + addressBook()->error( i18n( "Unable to initialize opie converter. Most likely a problem with the category file" ) ); + delete access; + return false; + } + } OContactAccess::List::Iterator it; OContactAccess::List allList = access->allRecords(); - bool res = false; for ( it = allList.begin(); it != allList.end(); ++it ) { OContact c = (*it); |