Add missing commits from master to 3.2
Carefully cherry-picked missing commits from master to 3.2.
All these commits are in master already, and we mostly need to ensure they are OK for 3.2 too. I built KEXI 3.2 today and it runs OK (whatever it means).
All commiters please note: all fixes and backward compatible improvements go to 3.2 not master. Then we merge 3.2 into master.
Edited by Jarosław Staniek