Re: [Qgis-developer] QgsProject.instance().writeEntry() with spaces in var name

2016-08-25 Thread Tom Chadwin
I think setting invalid var names should throw an error in 3.0. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/QgsProject-instance-writeEntry-with-spaces-in-var-name-tp5282208p5282275.html Sent from the Qua

Re: [Qgis-developer] QgsProject.instance().writeEntry() with spaces in var name

2016-08-25 Thread Tom Chadwin
Ah, OK. Thanks! No console warning message, as far as I can see. I'll sanitize the var names myself. What I'm more interested in is that reading from memory works, but when the vars are written to file, it changes. - Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon -- View this

Re: [Qgis-developer] QgsProject.instance().writeEntry() with spaces in var name

2016-08-24 Thread Olivier Dalang
Since https://github.com/qgis/QGIS/pull/469 (quite old) you're supposed to get a warning message in the console when using invalid keys. Keys must be valid XML names in order to be properly saved to the file. To me, being able to use invalid keys in the first place could arguably be considered as

[Qgis-developer] QgsProject.instance().writeEntry() with spaces in var name

2016-08-24 Thread Tom Chadwin
I don't know if this deduction from a lot of banging my head against a bug is correct, but this seems to me to be the behaviour: 1. QgsProject.instance().writeEntry() a variable with spaces in the variable name 2. Read it back in - this works 3. Save your project 4. Read it back in - works 5. Clos