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

List:       kde-commits
Subject:    kdenonbeta/kio_mhtml
From:       Spiros Georgaras <sngeorgaras () otenet ! gr>
Date:       2004-12-20 12:09:40
Message-ID: 20041220120940.AF3761BC4C () office ! kde ! org
[Download RAW message or body]

CVS commit by sngeorgaras: 

include fix


  M +14 -10    kmhtmlarchive.cpp   1.10
  M +2 -0      kmhtmlarchive.h   1.5


--- kdenonbeta/kio_mhtml/kmhtmlarchive.cpp  #1.9:1.10
@@ -308,5 +308,5 @@ bool KmhtmlArchive::readItems(){
                 QCString fContents;
                 fContents=f.mid(item[i].itStart,item[i].end-item[i].itStart+1);
-                QByteArray exC(fContents.length());
+                QByteArray exC(100);
                 QCString exContents=fContents;
                 switch(item[i].encoding){
@@ -318,9 +318,12 @@ bool KmhtmlArchive::readItems(){
                         break;;
                 case 1: // base64
-                        exC.fill(0);
+                        //exC.fill(0);
+                        kdDebug()<<fContents<<endl;
                         KCodecs::base64Decode(fContents,exC);
+                        kdDebug()<<"item[i].decodedSize="<<exC.size()<<endl;
                         fixFileName(exC,i);
                         item[i].data=exC;
                         item[i].decodedSize=exC.size();
+                        \
kdDebug()<<"item[i].decodedSize="<<item[i].decodedSize<<endl;  break;;
                 case 2: // uuencode
@@ -364,12 +367,4 @@ bool KmhtmlArchive::readItems(){
                 }
         }
-        // check for mixed part
-        for(int y=0;y<parts;y++){
-                if(partHeader[y].contenttype=="multipart/mixed"){
-                        //kdDebug()<< "[KmhtmlArchive::readData]: multipart/mixed \
                found at " << y << endl;
-                        // if multipart/mixed, combine html files....
-                        break;
-                }
-        }
         
         // find type
@@ -381,4 +376,13 @@ bool KmhtmlArchive::readItems(){
                 }
         }
+        // check for mixed part
+        for(int y=0;y<parts;y++){
+                if(partHeader[y].contenttype=="multipart/mixed"){
+                        //kdDebug()<< "[KmhtmlArchive::readData]: multipart/mixed \
found at " << y << endl; +                        // if multipart/mixed, combine html \
files.... +                        break;
+                }
+        }
+        
         emit foundFilesInArchive(items);
         m_entries.clear();

--- kdenonbeta/kio_mhtml/kmhtmlarchive.h  #1.4:1.5
@@ -42,4 +42,5 @@ friend class KmhtmlEntry;
         long size(){return m_size;};
         void setFileName(QString fileName);
+        void reset();
         QStringList entries(){return m_entries;};
         int status;
@@ -73,4 +74,5 @@ private:
         void evalItemHeader(int id);
         QCString removeControlChars(QCString msg);
+        QCString trim(QCString tmp);
         
         struct elm{


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

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