[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kabc
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2005-01-08 1:33:42
Message-ID: 20050108013342.E679A1807B () office ! kde ! org
[Download RAW message or body]

CVS commit by tokoe: 

Parse images from Apples MacOSX addressbook correctly.

BUG:96263


  M +5 -3      vcardtool.cpp   1.11
  M +3 -0      vcardparser/vcardparser.cpp   1.16


--- kdelibs/kabc/vcardtool.cpp  #1.10:1.11
@@ -623,7 +623,9 @@ Picture VCardTool::parsePicture( const V
 
   QStringList params = line.parameterList();
-  if ( params.findIndex( "encoding" ) != -1 )
-    pic.setData( line.value().asByteArray() );
-  else if ( params.findIndex( "value" ) != -1 ) {
+  if ( params.findIndex( "encoding" ) != -1 ) {
+    QImage img;
+    img.loadFromData( line.value().asByteArray() );
+    pic.setData( img );
+  } else if ( params.findIndex( "value" ) != -1 ) {
     if ( line.parameter( "value" ).lower() == "uri" )
       pic.setUrl( line.value().asString() );

--- kdelibs/kabc/vcardparser/vcardparser.cpp  #1.15:1.16
@@ -77,4 +77,7 @@ VCard::List VCardParser::parseVCards( co
                 pair[0] = "encoding";
                 pair[1] = "quoted-printable";
+              } else if ( pair[0].lower() == "base64" ) {
+                pair[0] = "encoding";
+                pair[1] = "base64";
               } else {
                 pair.prepend( "type" );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic