summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxport
Side-by-side diff
Diffstat (limited to 'kaddressbook/xxport') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxport/opie/opie_xxport.cpp4
-rw-r--r--kaddressbook/xxport/vcard_xxport.cpp8
2 files changed, 8 insertions, 4 deletions
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp
index f30a205..d1def18 100644
--- a/kaddressbook/xxport/opie/opie_xxport.cpp
+++ b/kaddressbook/xxport/opie/opie_xxport.cpp
@@ -139,13 +139,13 @@ bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString
}
}
access->save();
delete access;
- delete backend;
+//US the deletion of the access object deletes the backend object as well.
return true;
}
KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
{
@@ -192,11 +192,11 @@ KABC::AddresseeList OpieXXPort::importContacts( const QString& ) const
}
// qDebug("found %s", c.fullName().latin1());
}
delete access;
- delete backend;
+//US the deletion of the access object deletes the backend object as well.
return adrlst;
}
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index c017f5b..54d0cbd 100644
--- a/kaddressbook/xxport/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard_xxport.cpp
@@ -176,21 +176,25 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
if ( !XXPortManager::importData.isEmpty() )
addrList = parseVCard( XXPortManager::importData );
else {
if ( XXPortManager::importURL.isEmpty() )
{
fileName = KFileDialog::getOpenFileName( QString::null, i18n("Select vCard to Import"), parentWidget() );
+ if ( fileName.isEmpty() )
+ return addrList;
+
}
else
{
//US url = XXPortManager::importURL;
qDebug("VCardXXPort::importContacts Urls at the moment not supported");
+ if ( url.isEmpty() )
+ return addrList;
+
}
- if ( url.isEmpty() )
- return addrList;
QFile file( fileName );
file.open( IO_ReadOnly );
QByteArray rawData = file.readAll();
file.close();