[Qgis-developer] Project files from old revision of QGIS

Martin Dobias wonder.sk at gmail.com
Tue Jan 8 05:26:12 EST 2008


Hi Magnus,

sorry for delayed response...
Thanks for doing this, I'm the one to blame for those changes in
project files. I think so far we have the policy that project files
from older versions of QGIS are not necessarily supported, but since
we're heading to 1.0 it's good to have this mechanism.

Once I will have some more spare time again I'll look into it to see
whether there are any more parts which should be transformed.

Regards
Martin

On Dec 25, 2007 7:57 PM, Magnus Homann <magnus at homann.se> wrote:
> Hello all,
> There has not been any effort of reading QGIS project files from older
> revision and keeping the data from the old project. Until now. :-)
>
> In the branch 'rev-up' I have started work in that direction. A system
> for detecting which version the project file was written in, a warning
> dialog and a framework for 'upgrading' project files are included.
>
> https://svn.qgis.org/repos/qgis/branches/qgis_rev-up
>
> The idea is that any developer that seomhow changes the stuff written
> into the project file, also must write a transformation function if
> applicable. He/She should at least make sure that missing information in
> the project file is handled by a reasonable default.
>
> Three cases:
> 1) Completetly new funtionality is added to QGIS, and a reasonable
> default value exist. E.g: A new angular renderer storing the field for
> determining angle, can be handled by a reasonable default (off).
>
> 2) Some new funtionality is added to QGIS, and it is either dependant on
> older settings, and/or have many settings that are related. This can be
> handled by cleverly specifying defaults or by using a transform function.
>
> 3) Changes in storing functionality that has existed (from user
> perspective). E.g: The way SRS/Coorindatetransform are stored have
> chnaged. Transform of data from old project files SHOULD be written.
>
> I have with the help of trial and error(s!) done some work in the areas
> I discovered; coordinate transforms and legend settings
> (visible/inOverview). I hope the developers who changed the way this is
> stored can take a look and see if I have missed something.
>
> IMPORTANT: When you change format of project file, please write a
> transform. My examples should guide you, it's not very hard.
>
> The transformation work in series, so we have one from 0.8.1 to 0.9.0
> and then from 0.9.0 to 0.9.1 and so on. Reading a 0.8.1 project from a
> 0.9.2 QGIS will run (if needed) three transform functions.
>
> The relevant file to edit is
>
> .../src/core/qgsprojectfile.cpp
>
> Questions? I can help you! I think this is important. :-)
>
> --
> Magnus Homann
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>



More information about the Qgis-developer mailing list