summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-08-17 19:23:08 (UTC)
committer zautrix <zautrix>2005-08-17 19:23:08 (UTC)
commitdfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5 (patch) (unidiff)
treef2c58bbb72294d1a7d1d3fac8c11e15087a01460 /kaddressbook
parentfefa169958abb9c487205d92b54c79532b6f924a (diff)
downloadkdepimpi-dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5.zip
kdepimpi-dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5.tar.gz
kdepimpi-dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5.tar.bz2
import fix
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxportmanager.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 7cb67ed..405f7ec 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -61,2 +61,3 @@ extern "C"
61#include "xxportmanager.h" 61#include "xxportmanager.h"
62#include "nameeditdialog.h"
62 63
@@ -134,2 +135,8 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data )
134 int count = 0; 135 int count = 0;
136
137 KConfig config( locateLocal("config", "kabcrc") );
138 config.setGroup( "General" );
139 int FormattedNameType = config.readNumEntry( "FormattedNameType", 1 );
140
141
135 for ( it = list.begin(); it != list.end(); ++it ) { 142 for ( it = list.begin(); it != list.end(); ++it ) {
@@ -143,5 +150,7 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data )
143 } 150 }
144
145 (*it).setResource( resource ); 151 (*it).setResource( resource );
152 if ( (*it).formattedName().isEmpty() )
153 (*it).setFormattedName( NameEditDialog::formattedName( (*it), FormattedNameType ) );
146 if ( useUndo ) { 154 if ( useUndo ) {
155 ++count;
147 // We use a PwNewCommand so the user can undo it. 156 // We use a PwNewCommand so the user can undo it.
@@ -156,6 +165,4 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data )
156 } 165 }
157
158 if ( imported ) { 166 if ( imported ) {
159 KMessageBox::information( mCore, i18n( "%1 contacts\nsuccessfully\nimported.").arg( count) ); 167 KMessageBox::information( mCore, i18n( "%1 contacts\nsuccessfully\nimported.").arg( count) );
160
161 emit modified(); 168 emit modified();