Fix for bug 364530
Review Request #128314 - Created June 29, 2016 and discarded
|Chinmoy Ranjan Pradhan|
The function KFileItem::targetUrl() expands "desktop:/" to "/home/$USER/Desktop/" and doesn't add scheme "file" to the url. Due to this a schemeless url is passed to KRun causing KRun to show an error message despite the fact that the file exist.
The proposed patch will cause targetUrl() to check the url for a scheme and add "file" scheme if there exist no scheme.
This means the UDS_TARGET_URL wasn't a proper URL to start with. The bug should be fixed in the kioslave that sets it.
setScheme("file") is always the wrong fix. The right fix is to write QUrl::fromLocalFile() at the place where we're creating a URL from a local file.
i think i found the function which caused this buggy behaviour. It is "entry.insert(KIO::UDSEntry::UDS_TARGET_URL, entry.stringValue(KIO::UDSEntry::UDS_LOCAL_PATH))" which sets UDS_TARGET_URL's field value to a schemeless url.
i have created a differential in phabricator (https://phabricator.kde.org/D2054) for the fix.
Status: Closed (submitted)
Closed by commit rPLASMAWORKSPACE6911541421dc