On Fri, Feb 01, 2008 at 01:52:54PM +0100, Fathi Boudra wrote:
> you can easily adapt the patch as the important part
> is textstream usage.

Which is what I did and tried.

This patch:

$ cat 
chroot/sid-packages/home/mh/kdeutils/kdeutils-3.5.8/debian/patches/20_hibernate_444500.diff
diff -Nur kdeutils-3.5.8/klaptopdaemon/portable.cpp 
kdeutils-3.5.8.new/klaptopdaemon/portable.cpp
--- kdeutils-3.5.8/klaptopdaemon/portable.cpp   2008-02-01 13:20:21.000000000 
+0100
+++ kdeutils-3.5.8.new/klaptopdaemon/portable.cpp       2008-02-01 
13:22:33.000000000 +0100
@@ -694,7 +694,8 @@

                if (p.exists() && p.open(IO_ReadOnly)) {
                        QString l;
-                       p.readLine(l,500);
+                       QTextStream t(&p);
+                       l = t.readLine();
                        QStringList ll = QStringList::split(' ',l,false);
                        for (QValueListIterator<QString> i = ll.begin(); 
i!=ll.end(); i++) {
                                QString s = *i;
@@ -710,7 +711,8 @@
                }
                else if (f.exists() && f.open(IO_ReadOnly)) {
                        QString l;
-                       f.readLine(l, 500);
+                       QTextStream t(&f);
+                       l = t.readLine();
                        QStringList ll = QStringList::split(' ',l,false);
                        for (QValueListIterator<QString> i = ll.begin(); 
i!=ll.end(); i++) {
                                QString s = *i;
$                  

Fixes the issue for me.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to