question about AbstractFileManagerPluginPrivate::eventuallyReadFolder()

René J. V. Bertin rjvbertin at gmail.com
Sat Oct 7 09:27:09 UTC 2017


Sven Brauch wrote:

> It doesn't. The automatism is very simple, if obj1::thread() ==
> obj2::thread() it uses a Direct connection, otherwise a Queued one.

QObject::thread() returns "the thread in which the object lives." That's a 
little vague but that means " the thread in which the object was created", no?
In this case that would cause a DirectConnection to be used, which supposedly 
isn't right for signals sent from another thread.

The issue is reproducible (only the project toplevel directory is loaded when 
using Qt::QueuedConnection explicitly). It turns out though that the finished and 
entries signals are sent from code that appears to be running on the thread that 
created the FileManagerListJob instance. That explains why a DirectConnection is 
safe (but not why a QueuedConnection isn't?)

@Sven: didn't you remark that the project also imports the build directory? I 
saw that happen printing the payload of the entries signals. I guess we could 
apply the project filter in addJobItems(), no?

R



More information about the KDevelop-devel mailing list