Qt5: Stop QString::toAscii usage.
Qt5: Use new qt5's message handlers when available.
Cleanup.