The method fileName() was introduced with Qt 5.2, but at the moment I still would like to support Qt 5.0.

You could copy the code from QUrl::fileName():

~~~
QString QUrl::fileName(ComponentFormattingOptions options) const
{
    const QString ourPath = path(options);
    const int slash = ourPath.lastIndexOf(QLatin1Char('/'));
    if (slash == -1)
        return ourPath;
    return ourPath.mid(slash + 1);
}
~~~