QUrl::toLocalFile does some special handling for locally visable windows network drives. If QUrl::isLocal however it returns false and we get an empty string back. */
| 176 | If QUrl::isLocal however it returns false and we get an empty string back. |
| 177 | */ |
| 178 | QString Utils::urlToString(const QUrl &url) |
| 179 | { |
| 180 | if(!FileAccess::isLocal(url)) |
| 181 | return url.toString(); |
| 182 | |
| 183 | QString result = url.toLocalFile(); |
| 184 | if(result.isEmpty()) |
| 185 | return url.path(); |
| 186 | |
| 187 | return result; |
| 188 | } |
| 189 | |
| 190 | /* |
| 191 | QStringConverter::availableCodecs() returns codecs that are from our perspective duplicates or |