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

List:       kde-commits
Subject:    kdepim/kmailcvt
From:       Danny Kukawka <danny.kukawka () web ! de>
Date:       2005-04-12 17:05:48
Message-ID: 20050412170548.925CA633 () office ! kde ! org
[Download RAW message or body]

CVS commit by dkukawka: 

fixed problem with current and overall processbar


  M +9 -4      filter_pmail.cxx   1.39


--- kdepim/kmailcvt/filter_pmail.cxx  #1.38:1.39
@@ -63,4 +63,5 @@ void FilterPMail::import(FilterInfo *inf
     QStringList files = dir.entryList("*.[cC][nN][mM]; *.[pP][mM][mM]; \
*.[mM][bB][xX]", QDir::Files, QDir::Name);  totalFiles = files.count();
+    currentFile = 0;
     kdDebug() << "Count is " << totalFiles << endl;
 
@@ -97,6 +98,7 @@ void FilterPMail::processFiles(const QSt
         inf->addLog(i18n("Importing %1").arg(*mailFile));
         (this->*workFunc)(dir.filePath(*mailFile));
-        currentFile++;
-        inf->setOverall( 100 * currentFile / totalFiles );
+        ++currentFile;
+        inf->setOverall( (int) ((float) currentFile / totalFiles * 100));
+        inf->setCurrent( 100 );
         if (inf->shouldTerminate()) return;
     }
@@ -178,4 +180,7 @@ void FilterPMail::importMailFolder(const
             return;
         }
+        
+        inf->setCurrent( (int) ( ( (float) f.at() / f.size() ) * 100 ) );
+        
         switch (state) {
 


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

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