[Qgis-developer] configuration lost when running 2.0

Sandro Santilli strk at keybit.net
Wed Jun 12 09:55:23 PDT 2013


On Wed, Jun 12, 2013 at 06:36:22PM +0200, Borys Jurgiel wrote:
> Hmmm seems a config importer would be important addition. A post-install 
> script? A one-time core Python plugin? I mean something as simple as that:
> 
> for key in harcoded_list_of_important_keys_to_import:
>     if settings1.hasKey( key ):
>         settings2.setValue( settings1.value( key ) )
> QMessageBox( "Thank you, please restart QGIS now" )
> 
> As it only copies a bunch of QSetting values, it shouldn't introuce bugs, and 
> it's not really a feaure...

I guess you'll want to do that only when the new config file doesn't
exist, so it is about to be created. The user should be prompted about
that, something like:

 "Configuration file 'XXY' was not found, do you want to start a new
  one from scratch or do you want to copy it from an old one ?"

Then the tool should let you choose an old configuration to copy from.
Ideally you'd have the known old configs in a pull down menu, but still
allow the user to pick other locations.

--strk; 


More information about the Qgis-developer mailing list