But this will still do the wrong thing for other non-http URLs that aren't local files.
How about:
if (!art.contains("://") || QUrl(art).scheme() == "file")
and then keep the rest of the logic as before, but with the relativeFilePath() inside the if block.