It is likely the first check is not needed as the QUrl would not be valid in that case (second check).