PartController::saveFile() problem?

Jens Dagerbo jens.dagerbo at swipnet.se
Tue Dec 16 12:20:13 UTC 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

Maybe I misunderstand you, but as far as I can tell, the part->save() call is 
synchronous for local files and doesn't return until the save is completed. 

I guess there could be a problem if we're imagining a php-project that should 
upload its files to a remote location before attempting execution.. but for 
local files I think we are covered.

jd



On Saturday 13 December 2003 19.15, Jeroen Wijnhout wrote:
> Hi,
>
> I was browsing through the PartController source code with the goal to find
> out how KDevelop saves the files before running make on a project. (My app,
> Kile, is supposed to do a similar thing.)
>
> Anyway, a pitfall is, I guess, that the method
> void PartController::saveFile(KParts::Part *part)
> returns immediately after it calls
> part->save()
> therefore you can't be sure that the files have been saved before make is
> started, can you?
>
> I've checked the KParts source code, and KParts::ReadWritePart::saveToURL()
> connects the KIO job result signal to slotUploadFinished(), which in turns
> emits completed(). So somehow one should connect to this signal.
>
> Am I missing something, or shouldn't this procedure fail? In practice it
> might work ok in almost all cases, since saving a file usually is very
> fast. However, I really want to be sure that files are saved before make is
> started.
>
> best,
> Jeroen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/3unz6meJzsUuplQRAoJ9AKCMEJsBqWVRCrbFnRt3cJGKzP2tAwCbBfj9
QKH5E0u89lSRxXs8uwOGUR0=
=suDS
-----END PGP SIGNATURE-----




More information about the KDevelop-devel mailing list