summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/addressbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index e009d52..a1ce5a0 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -350,12 +350,18 @@ void AddressbookWindow::setDocument( const QString &filename )
OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
filename );
OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
OContactAccess::List allList = access->allRecords();
qWarning( "Found number of contacts in File: %d", allList.count() );
+ if ( !allList.count() ) {
+ QMessageBox::information( this, "Import VCard",
+ "It was impossible to import the VCard.\n"
+ "The VCard may be corrupted !" );
+ }
+
bool doAsk = true;
OContactAccess::List::Iterator it;
for ( it = allList.begin(); it != allList.end(); ++it ){
qWarning("Adding Contact from: %s", (*it).fullName().latin1() );
if ( doAsk ){
switch( QMessageBox::information( this, tr ( "Add Contact ?" ),