KDE4 porting mailing list?

Albert Astals Cid aacid at kde.org
Sun Nov 27 17:03:01 GMT 2005


A Diumenge 27 Novembre 2005 18:39, Stefan Winter va escriure:
> Hi,
Hi

> apologies for the dumb "I-can't-use-Google" question: is there any mailing
> list about the current status of porting KDE to Qt4, ideally where I could
> place questions about specific caveats?
> In case there isn't, my current problem with getting kdenetwork/wifi
> KWiFiManager to work properly again is:
>
> QFile apparently doesn't like reading from /proc any more. When I
> open /proc/net/dev with QIODevice::readOnly, I get pos()=0, atEnd=true and
> thus can't read anything out of the file. I've read about QIODevice
> changing behaviour wrt to sequential/non-sequential files, but I didn't
> find a solution to deal with the file properly.

IIRC the suggested solution is something like

while (true)
{
	foo = read();
	if (foo.isNull()) break;
	doSomething()
}

Albert

>
> The code fragment and debug output for this problem is:
>
> QFile procnetdev("/proc/net/dev");
> if ( !procnetdev.open (QIODevice::ReadOnly) ) {
>   kdDebug () << "Unable to open /proc/net/dev" << endl;
>   return liste;
> };
> kdDebug () << "Autodetecting, QFile pos() = " << procnetdev.pos() << endl;
> kdDebug () << "QFile thinks it has"
>                  << (procnetdev.atEnd() ? " " : " not ")
>                  << "reached the end." << endl;
>
> kwifimanager: Autodetecting, QFile pos() = 0
> kwifimanager: QFile thinks it has reached the end.
>
> And the result of a "cat /proc/net/dev" is non-empty, of course:
> Inter-|   Receive                                                | 
> Transmit face |bytes    packets errs drop fifo frame compressed
> multicast|bytes lo: 1940135   17281    0    0    0     0          0        
> 0  1940135 eth0:       0       0    0    0    0     0          0         0 
>       0 sit0:       0       0    0    0    0     0          0         0    
>    0 eth1:478424193 10152692
>
> Thanks,
>
> Stefan Winter

		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es





More information about the kde-core-devel mailing list