summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/xxport/vcard_xxport.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index 91df96d..9a8fa68 100644
--- a/kaddressbook/xxport/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard_xxport.cpp
@@ -202,25 +202,31 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
int start = 0;
#ifndef DESKTOP_VERSION
while ( start < rawData.size()-2 ) {
if ( rawData.at( start ) == '\r' )
if ( rawData.at( start+1 ) == '\n' )
if ( rawData.at( start+2 ) == ' ' ) {
rawData.remove(start,3);
--start;
}
++start;
}
#endif
+ int ret = KMessageBox::warningYesNoCancel( 0, i18n("Select import format!\nDefault and standard is Utf8.\nLatin1 may be the right\nfor some West Europian languages."), i18n("Import Format"), i18n("Utf8"), i18n("Latin1") );
+ if ( ret == KMessageBox::Cancel )
+ return addrList;
+ if ( ret == KMessageBox::Yes )
addrList = parseVCard( QString::fromUtf8( rawData.data() ) );
+ else
+ addrList = parseVCard( QString::fromLatin1( rawData.data() ) );
}
}
#endif //KAB_EMBEDDED
return addrList;
}
KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const
{
KABC::VCardTool tool;