Sources ported to build with Qt 5