Win32 build fixes

I am trying to make QtOctave build and work on Windows . This commit fixes major warnings and errors which prevents qtoctave.exe  from building using cmake generated projects for MSVC.
The next one will fix config saving errors.