I wouldn't point to QUrl::toDisplayString(), because that's definitely not what KUrl::path() was doing before (think about remote URLs).

The correct migration path from KUrl::path() is indeed QUrl::path() or QUrl::toLocalFile() (because a lot of the old code written with KUrl is from before toLocalFile() even existed, back from when we didn't really support Windows).