Fix crash when getting into a QBuffer.

Code was assuming the QIODevice was a QFile.