Fix compile with Qt5: Use QString::mid instead of QString::sliced
Sliced is a faster version of mid. In a test it doesn't matter which one we use, and this allows us to build Qt5 with tests enabled.
Change-Id: I668580d675224324bf481e7b17358bbbe44741fd