Getting the current active project

Andras Mantia amantia at kde.org
Tue Apr 3 11:04:59 UTC 2007


On Tuesday 03 April 2007, Andreas Pakulat wrote:
> Uhm, well the problem here is that uploading cannot be done by
> IProject, because it doesn't get notified when the Apply or Ok button
> in the configuration dialog is hit. However the KConfigSkeleton for
> the current dialog page will get notified and the upload would be in
> there (it would also update the local cached files too). So the
> IProject needs to sync with the locally cached files, everytime its
> projectConfiguration() method is accessed.
If this doesn't happen too often, I think its a good idea to do it.

> Also I'm currently thinking about removing the local/globalFile
> functions from IProject because those cannot be used reliably to read
> or write the files.

I don't know what they are good for, so I cannot comment. :)

> > If KDevelop crashes, the entry from the kdeveloprc will not be
> > removed, so on the next startup it knows that there is a downloaded
> > project file, which can be used to recover and go on from the last
> > state instead of downloading an older version from the remote
> > place.
>
> This won't work in all cases. For example if kdevelop crashes and the
> user uses other means to change the remote project file, we shouldn't
> be uploading our local cache.

Of course, the UI should ask the user about what to do (use the local 
version, download again the remote version, view the diff). 

> Also with the approach I have in mind there's only a very small
> timespan during which a crash would loose the project configuration.
> Basically because we upload it on each apply/ok click. Of course it
> can still happen, but I really don't see a way to recover from a
> crash when we don't know wether out locally cached file is still
> valid.

If the period for which the local file is newer than the remote one is 
very small, indeed there is no need to think about such recovery 
mechanism. But if its possible that the project file will be modified 
often and not only in the project config dialog, than it doesn't make 
sense to upload every time the changes as it will generate a lot of 
traffic and will be slow. In that case it might be that the files are 
out of synch for a longer time and such recovery is important. But we 
will find this in the future, whether we need it or not.

BTW, I plan to port the document recovery from Quanta to a KDevelop 
plugin. ;)


Andras
-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070403/1a459ad3/attachment.sig>


More information about the KDevelop-devel mailing list