Fix deprecated usage of QString and port the build system to Qt 5

Turns out porting the build system that there were more deprecated
code dealing with QString. It has been changed to QLatin1String.