Fix warnings under Windows and with Qt-Creator

from compiler, cmake and build environment.

I tried my best not to change any existing behaviour, but surely some close inspection is due.
It compiled, builds and runs, but I haven't done more testing.