Porting to Qt5

The changes that were previously proposed were tested on Windows Xp, too. This pull request contains both previous code and new additions to make it work on windows. There are still a number of warnings that should be resolved with (comparations between signed and unsigned, mostly).

This proposed change also removes a warning when compiling with MinGW about pragma that was intended to MSVC.

Warning about strcasecmp() are also removed (MinGW may define the macro).