Changeset 18d1745


Ignore:
Timestamp:
08/25/14 06:58:26 (4 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.3, releng/10.1
Children:
a31b84b
Parents:
eb30981
Message:

Make sure the installed/browser pages show the same size for installed applications. Only include dependency sizes if the pkg itself has no size information (so it is a meta-pkg).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-softwaremanager/pbiNgBackend.cpp

    r3a23f28 r18d1745  
    407407  double bytes = 0; 
    408408  QStringList deps; 
    409   if(info.isInstalled){ deps = info.dependency;  bytes = pkgSizeToBytes(info.installedsize); } //only use direct dependencies (better appx) 
    410   else{ deps = listDependencies(appID); bytes = pkgSizeToBytes(info.size); } //check the entire dep tree for missing pkgs 
     409  if(info.isInstalled){  
     410    bytes = pkgSizeToBytes(info.installedsize);  
     411    if(bytes == 0){ //only check direct dependencies if a meta-pkg (no size for pkg) 
     412      deps = info.dependency;  //only use direct dependencies (better appx) 
     413    }  
     414  }else{ deps = listDependencies(appID); bytes = pkgSizeToBytes(info.size); } //check the entire dep tree for missing pkgs 
    411415  for(int i=0; i<deps.length(); i++){ 
    412416    NGApp dep = singleAppInfo(deps[i],injail); 
     
    421425    if(sz.isEmpty()){ continue; } 
    422426    bytes+= pkgSizeToBytes(sz); 
     427    QCoreApplication::processEvents(); //keep the UI snappy 
    423428  } 
    424429  //Now convert the size back into the right format 
Note: See TracChangeset for help on using the changeset viewer.