[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:       2005-01-07 22:14:19
Message-ID: 20050107221419.28D6C1BB0B () office ! kde ! org
[Download RAW message or body]

CVS commit by sngeorgaras: 

speed ups


  M +3 -3      kmhtmlarchive.cpp   1.14
  M +2 -2      kmhtmlarchive.h   1.8
  M +2 -1      mhtml.cc   1.6


--- kdenonbeta/kio_mhtml/mhtml.cc  #1.5:1.6
@@ -417,5 +417,6 @@ QByteArray mhtmlProtocol::fixHtmlFile(Km
 QString mhtmlProtocol::escapeString(QString str){
         QString ret=QString::null;
-        for(int i=0;(uint)i<str.length();i++){
+        uint strLength=str.length();
+        for(int i=0;(uint)i<strLength;i++){
                 QChar c=str.at((uint)i);
                 if(c==QChar('\\') || c==QChar('/') || c==QChar('(') || c==QChar(')') \
|| 

--- kdenonbeta/kio_mhtml/kmhtmlarchive.cpp  #1.13:1.14
@@ -611,5 +611,5 @@ void KmhtmlArchive::fixFileName(QByteArr
                 item[i].hasExtension=TRUE;
         }else{
-                if(ext!="" && tmp.right(4).lower()!=QString(".css") && \
tmp.right(3).lower()!=QString(".js")){ +                if(!ext.isEmpty() && \
tmp.right(4).lower()!=QString(".css") && tmp.right(3).lower()!=QString(".js")){  int \
c=tmp.findRev(".");  tmp=tmp.left(c+1)+ext;
@@ -910,5 +910,5 @@ QCString KmhtmlArchive::trim(QCString tm
 /*================================
 ================================*/
-KmhtmlEntry::KmhtmlEntry(KmhtmlArchive* arch,QString fileName){
+KmhtmlEntry::KmhtmlEntry(KmhtmlArchive* arch,const QString fileName){
         if(arch){
                 archive=arch;
@@ -997,5 +997,5 @@ bool KmhtmlEntry::findItemByName(){
 /*================================
 ================================*/
-QString KmhtmlEntry::escapeString(QString str){
+QString KmhtmlEntry::escapeString(const QString str){
         QString ret=QString::null;
         uint strLength=str.length();

--- kdenonbeta/kio_mhtml/kmhtmlarchive.h  #1.7:1.8
@@ -149,5 +149,5 @@ class KmhtmlEntry{
 public:
         //KmhtmlEntry();
-        KmhtmlEntry(KmhtmlArchive* arch,QString fileName);
+        KmhtmlEntry(KmhtmlArchive* arch,const QString fileName);
         KmhtmlEntry(KmhtmlArchive* arch, int item);
         ~KmhtmlEntry();
@@ -180,5 +180,5 @@ private:
         bool findItemById();
         bool findItemByName();
-        QString escapeString(QString str);
+        QString escapeString(const QString str);
 };
 #endif


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

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