KDE/kdevelop/lib/plugins/vcs/subversion
Andreas Pakulat
apaku at gmx.de
Mon Apr 9 12:20:26 UTC 2007
On 09.04.07 12:15:31, Paulo Moura Guedes wrote:
> On Monday 09 April 2007 09:44, dukju ahn wrote:
> > 2007/4/8, Andreas Pakulat <apaku at gmx.de>:
> > > On 08.04.07 15:57:04, dukju ahn wrote:
> > > > 2007/4/8, Andreas Pakulat <apaku at gmx.de>:
> > > > > Especially the KJob classes would be useful for
> > > > > stuff that takes longer (i.e. checkout of a project) and would allow
> > > > > the job to be visible in the desktop-wide job-widget.
> > > >
> > > > Although we use KJob, the progress dialog should be still implemented
> > > > manually. KJob only emits progress percent. Unlike KIO::Job, It doesn't
> > > > provide progress dialog. Can anyone be more specific why we should
> > > > use KJob instead of QThread?
> > >
> > > Our jobs are listed in the desktop wide progress bar. So One can hide
> > > kdevelop on a large checkout or update and still see the progress. Apart
> > > from the fact that its probably easier to hook a KJob class to a
> > > KProgressBar (or Q*) than having a QThread do the same. Or am I mistaken
> > > there? (I didn't look too close at KJob)
> >
> > I reviewed KJob's source code. KJOb is just an interfaces.
> >
> > The KJob::start() is pure virtual and it is
> > excuted by the main thread. Its role is to asynchronously start new job
> > in a main thread loop, or in a new thread, or in a new process.
>
> That's not correct. KIO is not thread safe, it can only be used in the main
> thread, i.e., in the GUI thread.
We're talking about kdecore/KJob, not KIO::Job. And we're not using KIO
for svn in KDevelop4, that turned out to be a bad option during KDevelop3.
> > >There is a delegate that handles the progress showing of KJob's IIRC.
> > >If you want more info, you should talk to ereslibre on IRC about it.
> >
> > The progress dialogs is not there. We should implement it manually.
> > I am worried whether the people had the wrong concept on KJob.
> > Kjob is just an interface and nothing is implemented.
>
> You can embed the progress bar of any job into your own widget. Take a look at
> KStatusBarJobTracker.
Thanks for the hint.
Andreas
--
You will be married within a year, and divorced within two.
More information about the KDevelop-devel
mailing list