[KDev4] Opening project with real ASync way

dukju ahn dukjuahn at gmail.com
Sun May 27 11:34:08 UTC 2007


I've implemented async way of openning project. Attatched files
are patch. The complete ProjectController was attached as a bunus.
because the patch file are hard to read for ProjectController.
I excluded Job classes from patch so that we can
focus only on KDevelop::Project, and ProjectController.
I used threadweaver for job class.

It works very well. But there is one problem. Because now
ProjectBaseItems are created on separated thread, we can't invoke
setIcon() at the constructor of ProjectBaseItem and its subclasses.
Otherwise it segfaulted. Especially KIO::pixmapForUrl() was the reason
of crash.

One solution would be to invoke setIcon() in the slot connected to
KJob::done(). Starting from top item, we go recursively into every
children and call childItem->setIcon().

Are Anyone against from this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asyncopen.patch
Type: text/x-diff
Size: 4447 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070527/981ed859/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: projectcontroller.cpp
Type: text/x-c++src
Size: 12049 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070527/981ed859/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: project.cpp
Type: text/x-c++src
Size: 13092 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070527/981ed859/attachment-0001.cpp>


More information about the KDevelop-devel mailing list