[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    signals and CopyJob vs. FileCopyJob
From:       Matt Koss <koss () miesto ! sk>
Date:       2000-03-04 17:01:22
[Download RAW message or body]


I have finally fixed Caitoo so that it at least compiles.

Now I moved on to implementing signals in jobs.

After studying the sources a bit, I have to admit that I really like them.
What in old kio needed to be implemented in each slave separately, now can be
easily changed on one place in the job classes.

However, I am a bit confused with a subjob creation.

E.g. I want to emit signal "copying( from, to )".

I see that method CopyJob::copyNextFile() calls KIO::file_copy().
So I would put signal "copying" into the class FileCopyJob.
But program that uses KIO::copy() could not connect to the signal "copying"
because KIO::copy() returns CopyJob and not FileCopyJob.

This means that I would need to emit signal from method CopyJob::copyNextFile()
for KIO::copy() and also in FileCopyJob, in case that some program uses
KIO::file_copy().

To me it seems like programs should generally use methods copy(), move() and
delete() that return the high level jobs like CopyJob or DeleteJob.
Only these jobs would then emit progress signals.
Or are these signals needed also in the low-level jobs ?

Am I missing something ?
Any opininions ?


		Regards

					Matt

-- 
Matej Koss	e-mail: koss@miesto.sk
Kosice		 ICQ# : 19344305
Slovakia

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic