No, there isn't.
Probably they wanted to split that functionality in smaller pieces.
If you want exactly that behavior and don't want to use a deprecated function, then use its implementation(as you showed it).
There should be no problem since the implementation uses QT4 API functions.
Regards
Bookmarks