Port QRegExp::exactMatch() by using QRegularExpression::anchoredPattern()
to match the entire subject string.
Remove filenameOnly(), it's been broken for a long time (QStringLiteral("[/\\]")
is not a valid QRegExp pattern); besides it's not needed as QFileInfo::fileName()
is used to get the filename.