MCPcopy Create free account
hub / github.com/KDE/kdiff3 / urlToString

Method urlToString

src/Utils.cpp:178–188  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

176 If QUrl::isLocal however it returns false and we get an empty string back.
177*/
178QString 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

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected