author | ulf69 <ulf69> | 2004-07-20 21:28:10 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-20 21:28:10 (UTC) |
commit | 6f2ccd235ef49d5606ecf4e540e8884f7a9b7ec4 (patch) (side-by-side diff) | |
tree | 8ce4d24be2dfd04c386665723530435b66701286 | |
parent | fba0c028ac0ce15d0f7473439e025c56f108145e (diff) | |
download | kdepimpi-6f2ccd235ef49d5606ecf4e540e8884f7a9b7ec4.zip kdepimpi-6f2ccd235ef49d5606ecf4e540e8884f7a9b7ec4.tar.gz kdepimpi-6f2ccd235ef49d5606ecf4e540e8884f7a9b7ec4.tar.bz2 |
remove the export was successfull dialog if the user canceled the operation
-rw-r--r-- | kaddressbook/xxport/csv_xxport.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/xxport/opie/opie_xxport.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/xxport/vcard_xxport.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index caee66d..d4d5475 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp @@ -111,25 +111,25 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& doExport( &file, list ); file.close(); return true; } #else //KAB_EMBEDDED QString fileName = KFileDialog::getSaveFileName( "addressbook.csv", i18n("Save file"), parentWidget() ); if ( fileName.isEmpty() ) - return true; + return false; QFile file( fileName ); if ( !file.open( IO_WriteOnly ) ) { QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); KMessageBox::error( parentWidget(), txt.arg( fileName ) ); return false; } doExport( &file, list ); file.close(); return true; 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 @@ -87,25 +87,25 @@ OpieXXPort::OpieXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name 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; 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 @@ -89,25 +89,25 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString if ( list.count() == 1 ) 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 ) ) { QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); KMessageBox::error( parentWidget(), text.arg( fileName ) ); return false; } QTextStream t( &outFile ); t.setEncoding( QTextStream::UnicodeUTF8 ); KABC::Addressee::List::ConstIterator it; |