summaryrefslogtreecommitdiffstats
path: root/kaddressbook/thumbnailcreator
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/thumbnailcreator')
-rw-r--r--kaddressbook/thumbnailcreator/ldifvcardcreator.cpp10
-rw-r--r--kaddressbook/thumbnailcreator/ldifvcardcreator.h1
-rw-r--r--kaddressbook/thumbnailcreator/ldifvcardthumbnail.desktop1
3 files changed, 11 insertions, 1 deletions
diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp
index 0ed562e1..3de0220f 100644
--- a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp
+++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp
@@ -75,7 +75,13 @@ bool VCard_LDIFCreator::readContents( const TQString &path )
text.truncate(0);
// read the file
+#if defined(KABC_VCARD_ENCODING_FIX)
+ const TQByteArray data = file.readAll();
+ const TQString contents( data );
+ const TQCString contentsRaw( data.data(), data.size() );
+#else
TQString contents = file.readAll();
+#endif
file.close();
// convert the file contents to a KABC::Addressee address
@@ -83,7 +89,11 @@ bool VCard_LDIFCreator::readContents( const TQString &path )
KABC::Addressee addr;
KABC::VCardConverter converter;
+#if defined(KABC_VCARD_ENCODING_FIX)
+ addrList = converter.parseVCardsRaw( contentsRaw );
+#else
addrList = converter.parseVCards( contents );
+#endif
if ( addrList.count() == 0 )
if ( !KABC::LDIFConverter::LDIFToAddressee( contents, addrList ) )
return false;
diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.h b/kaddressbook/thumbnailcreator/ldifvcardcreator.h
index 7b5cface..2de6c7b4 100644
--- a/kaddressbook/thumbnailcreator/ldifvcardcreator.h
+++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.h
@@ -23,6 +23,7 @@
#include <tqpixmap.h>
#include <kio/thumbcreator.h>
+#include <kabc/vcardparser.h> // for KABC_VCARD_ENCODING_FIX define
class KPixmapSplitter;
diff --git a/kaddressbook/thumbnailcreator/ldifvcardthumbnail.desktop b/kaddressbook/thumbnailcreator/ldifvcardthumbnail.desktop
index 2eb63ab5..90d73eac 100644
--- a/kaddressbook/thumbnailcreator/ldifvcardthumbnail.desktop
+++ b/kaddressbook/thumbnailcreator/ldifvcardthumbnail.desktop
@@ -25,7 +25,6 @@ Name[hu]=Elektronikus névjegykártyák
Name[is]=Skrár með rafrænum nafnspjöldum
Name[it]=Biglietto da visita elettronico
Name[ja]=電子ビジネスカードファイル
-Name[ka]=ელექტრონული სავიზიტო ბარათების ფაილები
Name[kk]=Электрондық визитка файлдары
Name[km]=ឯកសារ​នាមប័ណ្ណ​អេឡិចត្រូនិច
Name[lt]=Elektroninės verslo kortelės bylos