summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxport/opie/opie_xxport.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/xxport/opie/opie_xxport.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/xxport/opie/opie_xxport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp
index db30d34..c9b0163 100644
--- a/kaddressbook/xxport/opie/opie_xxport.cpp
+++ b/kaddressbook/xxport/opie/opie_xxport.cpp
@@ -75,49 +75,49 @@ extern "C"
{
return ( new OpieXXPortFactory() );
}
}
OpieXXPort::OpieXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name )
: XXPortObject( ab, parent, name )
{
createImportAction( i18n( "Import Opie..." ) );
createExportAction( i18n( "Export Opie..." ) );
}
bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString &data )
{
QString name = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml";
#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;
OContactAccessBackend_XML* backend = new OContactAccessBackend_XML( "KA/Pi", fileName );
OContactAccess* access = new OContactAccess("KA/Pi", 0l, backend, false);
if ( !access ) {
qDebug("Unable to access file() %s", fileName.latin1());
addressBook()->error( i18n( "Unable to access file '%1'." ).arg( fileName ) );
return false;
}
KABC::OpieConverter mConverter;
bool res = mConverter.init();
if (!res)
{
QString text( i18n( "Unable to initialize opie converter.<br>Most likely a problem with the category file." ) );
qDebug(text);
KMessageBox::error( parentWidget(), text );
delete access;
return false;
}
//Now check if the file has already entries, and ask the user if he wants to delete them first.
OContactAccess::List contactList = access->allRecords();