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

Method cleanPath

src/fileaccess.cpp:1089–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1087}
1088
1089QString FileAccess::cleanPath(const QString& path) // static
1090{
1091 /*
1092 Tell Qt to treat the supplied path as user input otherwise it will not make useful decisions
1093 about how to convert from the possibly local or remote "path" string to QUrl.
1094 */
1095 const QUrl url = QUrl::fromUserInput(path, QString(), QUrl::AssumeLocalFile);
1096
1097 if(FileAccess::isLocal(url))
1098 {
1099 return QDir::cleanPath(path);
1100 }
1101 else
1102 {
1103 return path;
1104 }
1105}
1106
1107bool FileAccess::createBackup(const QString& bakExtension)
1108{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected