author | zautrix <zautrix> | 2004-10-14 09:28:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-14 09:28:50 (UTC) |
commit | 3d79ab275374292196c7d032ffd2e321841c8cb0 (patch) (side-by-side diff) | |
tree | 6ceaba2a5f375cfebc88189000221fe456e6f9d2 /kabc | |
parent | 57bd80b04dddd40a897dce8b6902d1046d71c631 (diff) | |
download | kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.zip kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.tar.gz kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.tar.bz2 |
umlaute phone fixes
-rw-r--r-- | kabc/addressbook.cpp | 3 | ||||
-rw-r--r-- | kabc/addressbook.h | 2 | ||||
-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.cpp | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index c584c35..3641c0c 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -472,17 +472,17 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName ) } else { qDebug("Error open temp file "); return false; } return true; } -void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld ) +int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld ) { if ( removeOld ) setUntagged( true ); KABC::Addressee::List list; QFile file( fileName ); file.open( IO_ReadOnly ); QByteArray rawData = file.readAll(); @@ -505,16 +505,17 @@ void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool rem if ( replaceLabel ) (*it).removeVoice(); if ( removeOld ) (*it).setTagged( true ); insertAddressee( (*it), false, true ); } if ( removeOld ) removeUntagged(); + return list.count(); } void AddressBook::setUntagged(bool setNonSyncTagged) // = false) { Iterator ait; for ( ait = begin(); ait != end(); ++ait ) { if ( setNonSyncTagged ) { if ( (*ait).resource() && ! (*ait).resource()->includeInSync() ) { (*ait).setTagged( true ); diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 23bba02..5edca06 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -142,17 +142,17 @@ class AddressBook : public QObject */ bool save( Ticket *ticket ); bool saveAB( ); bool saveABphone( QString fileName ); void smplifyAddressees(); void preparePhoneSync( QString currentSyncDevice, bool isPreSync ); void export2File( QString fileName ); bool export2PhoneFormat( QStringList uids ,QString fileName ); - void importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false ); + int importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false ); void setUntagged( bool setNonSyncTagged = false ); void removeUntagged(); void findNewExtIds( QString fileName, QString currentSyncDevice ); /** Returns a iterator for first entry of address book. */ Iterator begin(); diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp index 2cdf4bf..ba17c50 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp @@ -67,18 +67,18 @@ ResourceSharpDTM::ResourceSharpDTM( const KConfig *config ) : Resource( config ), mConverter (0) { // we can not choose the filename. Therefore use the default to display QString fileName = SlZDataBase::addressbookFileName(); init( fileName ); } -ResourceSharpDTM::ResourceSharpDTM( const QString &fileName, bool syncable ) - : Resource( 0, syncable ) +ResourceSharpDTM::ResourceSharpDTM( const QString &fileName ) + : Resource( 0 ) { init( fileName ); } void ResourceSharpDTM::init( const QString &fileName ) { connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); |