Changeset 01d574a


Ignore:
Timestamp:
04/29/14 09:14:11 (6 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.2, releng/10.0.3
Children:
2e33c7f
Parents:
1b6f8e8
Message:

Fix a couple bugs in the pkg download parsing for the libPCBSD DLProcess.

Location:
src-qt4/libpcbsd/utils
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/libpcbsd/utils/pcbsd-DLProcess.cpp

    rd88fa1f r01d574a  
    8080  //Get percentage complete 
    8181  if(totok && curok){ 
    82     bool totErr = (tot==cur); //catch for a display error where the cur is always identical to the tot 
    83     if(!totErr){           
    8482      //Calculate the percentage 
    8583      percent = (cur/tot)*100; 
    8684      percent = int(percent*10)/10.0; 
    87     }else{ 
    88       //(Total = Current) bug: unknown percentage since process is still running 
    89       percent = -1; 
    90     }        
    9185  }else{ 
    9286    percent = -1; 
     
    159153          // Get the file basename 
    160154          file = line; 
     155          //qDebug() << "DL File:" << file; 
    161156          file.truncate(line.indexOf("\"")); 
    162           file = file.section("/",-1).section(".",0,0); //replace the QFileInfo method below (Ken) 
     157          file = file.section("/",-1).section(".txz",0,0); //replace the QFileInfo method below (Ken) 
    163158          //QFileInfo tFile; 
    164159          //tFile.setFile(file); 
  • src-qt4/libpcbsd/utils/pcbsd-DLProcess.h

    rd88fa1f r01d574a  
    88#include <QDebug> 
    99#include <QFile> 
     10#include <QFileInfo> 
    1011 
    1112class DLProcess : public QProcess{ 
Note: See TracChangeset for help on using the changeset viewer.