[PC-BSD Commits] r16101 - pcbsd/current/src-qt4/pc-softwaremanager
svn at pcbsd.org
svn at pcbsd.org
Fri Mar 30 08:34:17 PDT 2012
Author: kenmoore
Date: 2012-03-30 15:34:17 +0000 (Fri, 30 Mar 2012)
New Revision: 16101
Modified:
pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
Log:
Discovered that the PBI size variable in the AppCafe was reading the wrong index entry: fixed it and set to display the size in MB to 2 decimel places
Modified: pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp 2012-03-30 14:29:38 UTC (rev 16100)
+++ pcbsd/current/src-qt4/pc-softwaremanager/softmanager-pbibrowser.cpp 2012-03-30 15:34:17 UTC (rev 16101)
@@ -755,7 +755,12 @@
arch = indexTmp.at(i).section(':', 1, 1);
ver = indexTmp.at(i).section(':', 2, 2);
date = indexTmp.at(i).section(':', 4, 4);
- size = indexTmp.at(i).section(':', 7, 7);
+ size = indexTmp.at(i).section(':', 9, 9);
+ if(!size.isEmpty() ){
+ float num = size.toFloat()/1024; //in MB
+ num = int(num*100 + 0.5)/100.0; //round to 2 decimel places
+ size.setNum( num ).append(" MB");
+ }
found = true;
break;
}
@@ -764,7 +769,12 @@
arch = indexTmp.at(i).section(':', 1, 1);
ver = indexTmp.at(i).section(':', 2, 2);
date = indexTmp.at(i).section(':', 4, 4);
- size = indexTmp.at(i).section(':', 7, 7);
+ size = indexTmp.at(i).section(':', 9, 9);
+ if( !size.isEmpty() ){
+ float num = size.toFloat()/1024; //in MB
+ num = int(num*100 + 0.5)/100.0; //round to 2 decimel places
+ size.setNum( num ).append(" MB");
+ }
found = true;
}
}
More information about the Commits
mailing list