Fix bug when using QFileInfo