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

List:       kde-commits
Subject:    KDE_3_2_BRANCH: kdebindings/qtjava/designer/juic/java
From:       Marco Ladermann <marco.ladermann () gmx ! de>
Date:       2004-08-19 19:32:54
Message-ID: 20040819193254.818E190C5 () office ! kde ! org
[Download RAW message or body]

CVS commit by ladermann: 

Fixed problem with inflater for compressed XMP's


  M +5 -5      methods.xsl   1.1.2.6
  M +2 -4      put.xsl   1.1.2.4
  M +0 -1      util.xsl   1.1.2.6


--- kdebindings/qtjava/designer/juic/java/methods.xsl  #1.1.2.5:1.1.2.6
@@ -84,12 +84,12 @@
         QPixmap pix = null;
         try {
-            ByteArrayInputStream bais = new ByteArrayInputStream(data);
-            InflaterInputStream iis = new InflaterInputStream(bais);
+            Inflater inflater = new Inflater();
             byte [] xpm = new byte [size];
-            iis.read(xpm, 0, size);
+            inflater.setInput(data);
+            inflater.inflate(xpm, 0, size);
             pix = new QPixmap(xpm);
         }
-        catch (IOException ioe) {
-            System.err.println(ioe.getMessage());
+        catch (DataFormatException dfe) {
+            System.err.println(dfe.getMessage());
         }
         return pix;

--- kdebindings/qtjava/designer/juic/java/put.xsl  #1.1.2.3:1.1.2.4
@@ -144,9 +144,7 @@
         <xsl:if test="/UI/images">
             <xsl:message>Create imports to handle Images</xsl:message>
-            <xsl:value-of select="'import java.io.ByteArrayInputStream;'"/>
+            <xsl:value-of select="'import java.util.zip.DataFormatException;'"/>
             <xsl:value-of select="$newline"/>
-            <xsl:value-of select="'import java.io.IOException;'"/>
-            <xsl:value-of select="$newline"/>
-            <xsl:value-of select="'import java.util.zip.InflaterInputStream;'"/>
+            <xsl:value-of select="'import java.util.zip.Inflater;'"/>
             <xsl:value-of select="$newline"/>
         </xsl:if>

--- kdebindings/qtjava/designer/juic/java/util.xsl  #1.1.2.5:1.1.2.6
@@ -109,5 +109,4 @@
       <xsl:param name="text"/>
       <func:result>
-        <xsl:message>toJavaString(<xsl:value-of select="$text"/>)</xsl:message>
         <xsl:variable name="s1" select="kde:replace($text, '\', '\\')"/>
         <xsl:variable name="s2" select="kde:replace($s1, '&quot;', '\&quot;')" />


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

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