Changeset 3437bfa


Ignore:
Timestamp:
04/20/15 08:12:45 (5 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.1.2, releng/10.2, stable/10
Children:
3d6896c
Parents:
4b90f65
Message:

If the string->double conversion fails for some reason (giving a number less than or equal to 0) then skip that entry.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt5/pc-mounttray/fsWatcher.cpp

    r83a335a r3437bfa  
    3838      double iUsed = floor(displayToDouble(used)); 
    3939      double iTotal = floor(displayToDouble(avail)) + iUsed; 
     40      if(iUsed <=0 || iTotal <=0){ continue; } //skip this line - error getting values 
    4041      int percent = calculatePercentage(iUsed, iTotal); 
    4142      //qDebug() << "Percent calc: tot:"<<iTotal<<"used"<<iUsed<<"percent"<<percent; 
     
    6667        double iUsed = displayToDouble(used); 
    6768        double iTotal = displayToDouble(total); 
     69        if(iUsed <=0 || iTotal <=0){ continue; } //skip this line - error getting values 
    6870        int percent = calculatePercentage(iUsed, iTotal); 
    6971        //qDebug() << "df Item:" << dfout[i]; 
Note: See TracChangeset for help on using the changeset viewer.