KIO::ListJob::entries emits twice for folders with 100+ entries. Why?
David Faure
faure at kde.org
Fri Nov 23 09:42:13 GMT 2012
On Friday 23 November 2012 00:49:11 Mark wrote:
> I'm hitting a bit of an issue here in debugging SlaveBase::listEntry..
> KIO is not running in the same thread as i'm running which makes
> debugging tricky.
Err, KIO doesn't really support threads. You have to run KIO in the main
thread. Well if you connect the job to slots in another thread and never call
any KJob API from that thread, I guess it can work out ok, but only then.
> However, when i use GDB and set any breakpoints in slavebase.cpp in
> the SlaveBase::listEntry funtion it does break but in my main
> function..
SlaveBase is in the kioslave, not in your application. So you need to kill
kio_file and you need to type "kdeinit4" in a terminal.
Otherwise kio_file gets started via an old kdeinit4 which has the old libkio
loaded (the one without your debug output).
I recommend kDebug over gdb for this, especially for a method that is called
500 times.
> What i can do is grab the logic out ant test it in a separate C++ project.
Well yeah you already posted a test program iirc.
Otherwise here's mine: http://www.davidfaure.fr/2012/kio-listdir.zip
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
More information about the kde-core-devel
mailing list