PartController::saveFile() problem?

Jeroen Wijnhout Jeroen.Wijnhout at kdemail.net
Sat Dec 13 19:05:05 UTC 2003


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

-- 
Kile - an Integrated LaTeX Environment for KDE
http://kile.sourceforge.net




More information about the KDevelop-devel mailing list