summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-07-15 15:15:52 (UTC)
committer ulf69 <ulf69>2004-07-15 15:15:52 (UTC)
commitec8315212b05c128c8d5650cf5daff2b1d6b84dd (patch) (unidiff)
treeae4ffd799c19caa18c1b0964783f915395769a24
parent59f727076930aada485db6531d4084f2bfe0b928 (diff)
downloadkdepimpi-ec8315212b05c128c8d5650cf5daff2b1d6b84dd.zip
kdepimpi-ec8315212b05c128c8d5650cf5daff2b1d6b84dd.tar.gz
kdepimpi-ec8315212b05c128c8d5650cf5daff2b1d6b84dd.tar.bz2
resolved crash during import of opie and qtopia addressbooks
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.cpp2
-rw-r--r--kaddressbook/xxport/opie/opie_xxport.cpp11
-rw-r--r--kaddressbook/xxport/qtopia/qtopia_xxport.cpp12
3 files changed, 22 insertions, 3 deletions
diff --git a/kabc/converter/qtopia/qtopiaconverter.cpp b/kabc/converter/qtopia/qtopiaconverter.cpp
index f451b8b..498e89e 100644
--- a/kabc/converter/qtopia/qtopiaconverter.cpp
+++ b/kabc/converter/qtopia/qtopiaconverter.cpp
@@ -206,7 +206,7 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a
206 if (contact.anniversary().isValid()) { 206 if (contact.anniversary().isValid()) {
207 QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate); 207 QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate);
208//US 208//US
209 qDebug("OpieConverter::qtopiaToAddressee found:%s", dt.latin1()); 209// qDebug("QtopiaConverter::qtopiaToAddressee found:%s", dt.latin1());
210 addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); 210 addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
211 } 211 }
212 212
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
@@ -184,7 +184,16 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
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; 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 }
188 197
189 198
190 OContactAccess::List::Iterator it; 199 OContactAccess::List::Iterator 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
@@ -163,7 +163,17 @@ KABC::AddresseeList QtopiaXXPort::importContacts( const QString& ) const
163 } 163 }
164 164
165 KABC::QtopiaConverter mConverter; 165 KABC::QtopiaConverter mConverter;
166 bool res = false; 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
167 177
168 178
169 { //create a new scope 179 { //create a new scope