Getting the current active project
Andreas Pakulat
apaku at gmx.de
Tue Apr 3 11:19:55 UTC 2007
On 03.04.07 14:04:59, Andras Mantia wrote:
> 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.
Well, I think it might happen quite often, so I'm currently thinking
about doing a stat on the config file and see wether the modification
time is newer than the "stored" one. I guess a stat is faster than a
reparse and modification time should be sufficient here.
> > 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. :)
The given your a QString containing the project file and the
user-specific project file. But with remote projects this doesn't make
much sense and it would allow to create KConfig objects from the files,
which would sooner or later be out-of-sync. The project should deliver
its configuration via a KSharedConfig::Ptr.
> But if its possible that the project file will be modified
> often and not only in the project config dialog
I don't see a use-case for a plugin modifiying the project file
directly, but the possibility exists.
>, 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.
Well, we won't catch modifications that are done via something other
than the configuration dialog (I think). So if we allow to modify the
project config from plugins then we need to do this as then we should do
the remote-synch only on project open/close and eventually on the
configuration-dialog-Ok/Apply.
Andreas
--
Your love life will be happy and harmonious.
More information about the KDevelop-devel
mailing list