--- ./klaptopdaemon/portable.cpp.old 2007-05-14 11:40:45.000000000 +0400 +++ ./klaptopdaemon/portable.cpp 2007-08-14 01:52:30.775790879 +0400 @@ -690,15 +690,16 @@ has_acpi_sleep(int state) mask = 0; QFile p("/sys/power/state"); - QFile f("/proc/acpi/sleep"); if (p.open(IO_ReadOnly)) { + QTextStream stream(&p); QString l; - p.readLine(l,500); + l = stream.readLine(); + QStringList ll = QStringList::split(' ',l,false); for (QValueListIterator i = ll.begin(); i!=ll.end(); i++) { QString s = *i; - + if (s.compare("standby")==0) mask |= (1<<1); else if (s.compare("mem")==0) @@ -708,20 +709,6 @@ has_acpi_sleep(int state) } p.close(); } - else if (f.open(IO_ReadOnly)) { - QString l; - f.readLine(l, 500); - QStringList ll = QStringList::split(' ',l,false); - for (QValueListIterator i = ll.begin(); i!=ll.end(); i++) { - QString s = *i; - if (s[0] == 'S') { - int c = s[1].digitValue(); - if (c >= 0 && c <= 9) - mask |= 1<