summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxport/vcard_xxport.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/xxport/vcard_xxport.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxport/vcard_xxport.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index adf47cd..4819341 100644
--- a/kaddressbook/xxport/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard_xxport.cpp
@@ -90,15 +90,15 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString
name = list[ 0 ].givenName() + "_" + list[ 0 ].familyName() + ".vcf";
else
name = "addressbook.vcf";
-
+
#ifndef KAB_EMBEDDED
QString fileName = KFileDialog::getSaveFileName( name );
#else //KAB_EMBEDDED
QString fileName = KFileDialog::getSaveFileName( name, i18n("Save file"), parentWidget() );
#endif //KAB_EMBEDDED
-
+
if ( fileName.isEmpty() )
- return true;
+ return false;
QFile outFile( fileName );
if ( !outFile.open( IO_WriteOnly ) ) {
@@ -168,13 +168,13 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
QString text = i18n( "<qt>Unable to access <b>%1</b>.</qt>" );
KMessageBox::error( parentWidget(), text.arg( url.url() ), caption );
}
-
+
}
-
+
#else //KAB_EMBEDDED
-
-
+
+
if ( !XXPortManager::importData.isEmpty() )
addrList = parseVCard( XXPortManager::importData );
else {
@@ -183,7 +183,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
fileName = KFileDialog::getOpenFileName( QString::null, i18n("Select vCard to Import"), parentWidget() );
if ( fileName.isEmpty() )
return addrList;
-
+
}
else
{
@@ -191,10 +191,10 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
qDebug("VCardXXPort::importContacts Urls at the moment not supported");
if ( url.isEmpty() )
return addrList;
-
+
}
-
+
QFile file( fileName );
file.open( IO_ReadOnly );
@@ -203,16 +203,16 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 );
addrList = parseVCard( data );
-
+
}
-#endif //KAB_EMBEDDED
-
+#endif //KAB_EMBEDDED
+
return addrList;
}
KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const
-{
-
+{
+
KABC::VCardTool tool;
KABC::AddresseeList addrList;
addrList = tool.parseVCards( data );