Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 120350 | Differences between
and this patch

Collapse All | Expand All

(-)src/hdsensorslist.cpp.orig (-19 / +20 lines)
Lines 45-72 Link Here
45
 if(!getDisks(disks)) return;
45
 if(!getDisks(disks)) return;
46
46
47
 ProcessExec proc;
47
 ProcessExec proc;
48
 proc << "hddtemp" << "-q";
48
 for(QStringList::Iterator it = disks.begin(); it != disks.end(); ++it ) {   
49
 for(QStringList::Iterator it = disks.begin(); it != disks.end(); ++it ) {
49
   proc.clearArguments() ;
50
   proc << "hddtemp" << "-q";
50
   proc << *it;
51
   proc << *it;
52
   if(proc.runAndWait()) {
53
     double value;
54
     QString str;
55
     for(QStringList::Iterator it = disks.begin(); it != disks.end(); ++it ) {
56
       if(getDiskInfo(proc.getStdoutData(),*it,str,value)) {
57
          Sensor *sensor= new Sensor(this);
58
          sensor->setType(Sensor::lmTemp);
59
          sensor->setName(*it);
60
          sensor->setDescription(str);
61
          sensor->setValueMax  (40   , Sensor::dgCelsius);
62
          sensor->setValueMin  ( 0   , Sensor::dgCelsius);
63
          sensor->setValueIdeal(value, Sensor::dgCelsius);
64
          sensor->setValue     (value, Sensor::dgCelsius);
65
          sensor->readConfig();
66
       }
67
     }
68
  }  
51
 }
69
 }
52
70
53
 if(proc.runAndWait()) {
54
    double value;
55
    QString str;
56
    for(QStringList::Iterator it = disks.begin(); it != disks.end(); ++it ) {
57
      if(getDiskInfo(proc.getStdoutData(),*it,str,value)) {
58
         Sensor *sensor= new Sensor(this);
59
         sensor->setType(Sensor::lmTemp);
60
         sensor->setName(*it);
61
         sensor->setDescription(str);
62
         sensor->setValueMax  (40   , Sensor::dgCelsius);
63
         sensor->setValueMin  ( 0   , Sensor::dgCelsius);
64
         sensor->setValueIdeal(value, Sensor::dgCelsius);
65
         sensor->setValue     (value, Sensor::dgCelsius);
66
         sensor->readConfig();
67
      }
68
    }
69
 }
70
}
71
}
71
72
72
HDSensorsList::~HDSensorsList()
73
HDSensorsList::~HDSensorsList()

Return to bug 120350