replaced .toAscii() for .toLatin1() in Qt5