summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressbook.cpp1
-rw-r--r--kaddressbook/kabcore.cpp3
2 files changed, 2 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index bf6d053..1a06956 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -402,25 +402,24 @@ void AddressBook::export2File( QString fileName )
t << "\r\n\r\n";
outFile.close();
}
void AddressBook::importFromFile( QString fileName, bool replaceLabel )
{
KABC::Addressee::List list;
QFile file( fileName );
file.open( IO_ReadOnly );
QByteArray rawData = file.readAll();
file.close();
- qDebug("AddressBook::importFromFile ");
QString data;
if ( replaceLabel ) {
data = QString::fromLatin1( rawData.data(), rawData.size() + 1 );
data.replace ( QRegExp("LABEL") , "ADR" );
data.replace ( QRegExp("CHARSET=ISO-8859-1") , "" );
} else
data = QString::fromUtf8( rawData.data(), rawData.size() + 1 );
KABC::VCardTool tool;
list = tool.parseVCards( data );
KABC::Addressee::List::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
(*it).setResource( 0 );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 3a542ba..efcd492 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -318,26 +318,27 @@ KABCore::~KABCore()
//saveSettings();
//KABPrefs::instance()->writeConfig();
delete AddresseeConfig::instance();
mAddressBook = 0;
KABC::StdAddressBook::close();
delete syncManager;
}
void KABCore::recieve( QString fn )
{
- qDebug("KABCore::recieve ");
+ //qDebug("KABCore::recieve ");
mAddressBook->importFromFile( fn, true );
+ mViewManager->refreshView();
topLevelWidget()->raise();
}
void KABCore::restoreSettings()
{
mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
bool state;
if (mMultipleViewsAtOnce)
state = KABPrefs::instance()->mDetailsPageVisible;
else
state = false;