-rw-r--r-- | kaddressbook/xxport/opie/opie_xxport.cpp | 11 | ||||
-rw-r--r-- | kaddressbook/xxport/qtopia/qtopia_xxport.cpp | 12 |
2 files changed, 21 insertions, 2 deletions
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp index 12c83af..db30d34 100644 --- a/kaddressbook/xxport/opie/opie_xxport.cpp +++ b/kaddressbook/xxport/opie/opie_xxport.cpp | |||
@@ -181,14 +181,23 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const | |||
181 | return KABC::AddresseeList(); | 181 | return KABC::AddresseeList(); |
182 | } | 182 | } |
183 | 183 | ||
184 | access -> setReadAhead( 32 ); // Use ReadAhead-Cache if available | 184 | access -> setReadAhead( 32 ); // Use ReadAhead-Cache if available |
185 | 185 | ||
186 | KABC::OpieConverter mConverter; | 186 | KABC::OpieConverter mConverter; |
187 | bool res = false; | ||
188 | 187 | ||
188 | bool res = mConverter.init(); | ||
189 | if (!res) | ||
190 | { | ||
191 | QString text( i18n( "Unable to initialize opie converter.<br>Most likely a problem with the category file." ) ); | ||
192 | qDebug(text); | ||
193 | KMessageBox::error( parentWidget(), text ); | ||
194 | delete access; | ||
195 | return KABC::AddresseeList(); | ||
196 | } | ||
197 | |||
189 | 198 | ||
190 | OContactAccess::List::Iterator it; | 199 | OContactAccess::List::Iterator it; |
191 | OContactAccess::List allList = access->allRecords(); | 200 | OContactAccess::List allList = access->allRecords(); |
192 | for ( it = allList.begin(); it != allList.end(); ++it ) | 201 | for ( it = allList.begin(); it != allList.end(); ++it ) |
193 | { | 202 | { |
194 | OContact c = (*it); | 203 | OContact c = (*it); |
diff --git a/kaddressbook/xxport/qtopia/qtopia_xxport.cpp b/kaddressbook/xxport/qtopia/qtopia_xxport.cpp index 3d830df..bf39fdb 100644 --- a/kaddressbook/xxport/qtopia/qtopia_xxport.cpp +++ b/kaddressbook/xxport/qtopia/qtopia_xxport.cpp | |||
@@ -160,14 +160,24 @@ KABC::AddresseeList QtopiaXXPort::importContacts( const QString& ) const | |||
160 | addressBook()->error( text ); | 160 | addressBook()->error( text ); |
161 | KMessageBox::error( parentWidget(), text ); | 161 | KMessageBox::error( parentWidget(), text ); |
162 | return KABC::AddresseeList(); | 162 | return KABC::AddresseeList(); |
163 | } | 163 | } |
164 | 164 | ||
165 | KABC::QtopiaConverter mConverter; | 165 | KABC::QtopiaConverter mConverter; |
166 | bool res = false; | ||
167 | 166 | ||
167 | bool res = mConverter.init(); | ||
168 | if (!res) | ||
169 | { | ||
170 | QString text( i18n( "Unable to initialize qtopia converter.<br>Most likely a problem with the category file." ) ); | ||
171 | qDebug(text); | ||
172 | KMessageBox::error( parentWidget(), text ); | ||
173 | delete access; | ||
174 | return KABC::AddresseeList(); | ||
175 | } | ||
176 | |||
177 | |||
168 | 178 | ||
169 | { //create a new scope | 179 | { //create a new scope |
170 | AddressBookIterator it(*access); | 180 | AddressBookIterator it(*access); |
171 | 181 | ||
172 | for (it.toFirst(); it.current(); ++it) { | 182 | for (it.toFirst(); it.current(); ++it) { |
173 | const PimContact*contact = it.current(); | 183 | const PimContact*contact = it.current(); |